code: def connect(self, *args, auto_reconnect=False, **kwargs):
          
          connection_info = {
              'auto_reconnect': auto_reconnect,
              'args': args,
              'kwargs': kwargs,
          }
          self.connect_info['connection'] = connection_info
  
          # confirm we have user info set
          if 'user' not in self.connect_info:
              raise Exception('`set_user_info` must be called before connecting to server.')
  
          # create connection and run
          connection = loop.create_connection(lambda: self,
                                              *args, **kwargs)
          asyncio.Task(connection)
docs: Connects to the given server.
  
          Args:
              auto_reconnect (bool): Automatically reconnect on disconnection.
  
          Other arguments to this function are as usually supplied to
          :meth:`asyncio.BaseEventLoop.create_connection`.