def open(self):
if self.running:<EOL><INDENT>return<EOL><DEDENT>self.running = True<EOL>try:<EOL><INDENT>self._handler.open(connection=self.connection)<EOL>while not self._handler.client_ready():<EOL><INDENT>time.sleep(<NUM_LIT>)<EOL><DEDENT><DEDENT>except Exception as e:  <EOL><INDENT>try:<EOL><INDENT>self._handle_exception(e)<EOL><DEDENT>except:<EOL><INDENT>self.running = False<EOL>raise<EOL><DEDENT><DEDENT>
Open handler connection and authenticate session.

        If the handler is already open, this operation will do nothing.
        A handler opened with this method must be explicitly closed.
        It is recommended to open a handler within a context manager as
        opposed to calling the method directly.

        .. note:: This operation is not thread-safe.