code: async def emit(self, event, data, namespace, room=None, skip_sid=None,
                     callback=None, **kwargs):
          
          if namespace not in self.rooms or room not in self.rooms[namespace]:
              return
          tasks = []
          for sid in self.get_participants(namespace, room):
              if sid != skip_sid:
                  if callback is not None:
                      id = self._generate_ack_id(sid, namespace, callback)
                  else:
                      id = None
                  tasks.append(self.server._emit_internal(sid, event, data,
                                                          namespace, id))
          if tasks == []:  # pragma: no cover
              return
          await asyncio.wait(tasks)
docs: Emit a message to a single client, a room, or all the clients
          connected to the namespace.
  
          Note: this method is a coroutine.