@staticmethod
    def get_handle(protocol, *args, **kwargs):
        """Returns an instance of a MailboxHandler based on the protocol"""

        if protocol in MB_IMAP4:
            return IMAPHandler(*args, **kwargs)
        elif protocol == MB_POP3:
            return POPHandler(*args, **kwargs)

        return None
dataset/ETHPy150Open codekoala/django-articles/articles/management/commands/check_for_articles_from_email.py/MailboxHandler.get_handle/operator `==` -> `in`