code: def publish(cls, message, client_filter=None):
      
      with cls._lock:
        for client in cls.subscribers:
          if (not client_filter) or client_filter(client):
            client.send(message)
docs: Publish messages to subscribers.
  
      Args:
        message: The message to publish.
        client_filter: A filter function to call passing in each client. Only
                       clients for whom the function returns True will have the
                       message sent to them.