docs: def connect(self):
          """This method connects to RabbitMQ, returning the connection handle.
          When the connection is established, the on_connection_open method
          will be invoked by pika.
  
          :rtype: pika.TornadoConnection
  
          """
          if not self.idle and not self.closed:
              raise ConnectionStateError(self.state_description)
          LOGGER.debug('Connecting to %s', self.url)
          self.state = self.STATE_CONNECTING
          self.connection = pika.TornadoConnection(
              parameters=self.parameters,
              on_open_callback=self.on_connection_open,
              on_open_error_callback=self.on_connection_open_error,
              on_close_callback=self.on_connection_closed,
              custom_ioloop=self.io_loop)