Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def create_client(self, host, port, loop, conn_lost_cb=None, ssl_context=None):
self.protocol = IMAP4ClientProtocol(loop, conn_lost_cb)
loop.create_task(loop.create_connection(lambda: self.protocol, host, port, ssl=ssl_context))