<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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 and \
                        self._network.is_connection_handshake_complete(
                            connection_id):
                    self.send(
                        message_type,
                        gossip_message.SerializeToString(),
                        connection_id,
                        one_way=True)