code: async def prepare_conn(self, conn):
          
  
          client_id = str(uuid.uuid4())
          monitor = functools.partial(self.send_event, client_id)
  
          self._logger.info("New client connection: %s", client_id)
  
          self.service_manager.add_monitor(monitor)
  
          self.clients[client_id] = dict(connection=conn, monitor=monitor)
          return client_id
docs: Setup a new connection from a client.