original_docstring: Broadcast gossip messages.
  
          Broadcast the message to all peers unless they are in the excluded
          list.
  
          Args:
              gossip_message: The message to be broadcast.
              message_type: Type of the message.
              exclude: A list of connection_ids that should be excluded from this
                  broadcast.
          
docstring: Broadcast gossip messages.
  Broadcast the message to all peers unless they are in the excluded
  list.
docstring_tokens: Broadcast gossip messages . Broadcast the message to all peers unless they are in the excluded list .
code: def broadcast(self, gossip_message, message_type, exclude=None):
          """Broadcast gossip messages.
  
          Broadcast the message to all peers unless they are in the excluded
          list.
  
          Args:
              gossip_message: The message to be broadcast.
              message_type: Type of the message.
              exclude: A list of connection_ids that should be excluded from this
                  broadcast.
          """
          with self._lock:
              if exclude is None:
                  exclude = []
              for connection_id in self._peers.copy():
                  if connection_id not in exclude:
                      self.send(
                          message_type,
                          gossip_message.SerializeToString(),
                          connection_id,
                          one_way=True)
code_tokens: def broadcast ( self , gossip_message , message_type , exclude = None ) : with self . _lock : if exclude is None : exclude = [ ] for connection_id in self . _peers . copy ( ) : if connection_id not in exclude : self . send ( message_type , gossip_message . SerializeToString ( ) , connection_id , one_way = True )
short_docstring: Broadcast gossip messages.
short_docstring_tokens: Broadcast gossip messages .
comment: """Broadcast gossip messages.
  
          Broadcast the message to all peers unless they are in the excluded
          list.
  
          Args:
              gossip_message: The message to be broadcast.
              message_type: Type of the message.
              exclude: A list of connection_ids that should be excluded from this
                  broadcast.
          """