<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unregister_peer(self, connection_id):
 """Removes a connection_id from the registry. Args: connection_id (str):
 A unique identifier which identifies an connection on the network server socket. """

        public_key = self.peer_to_public_key(connection_id)
        if public_key:
            self._consensus_notifier.notify_peer_disconnected(public_key)

        with self._lock:
            if connection_id in self._peers:
                del self._peers[connection_id]
                LOGGER.debug("Removed connection_id %s, "
                             "connected identities are now %s",
                             connection_id, self._peers)
                self._topology.set_connection_status(connection_id,
                                                     PeerStatus.TEMP)
            else:
                LOGGER.warning("Connection unregister failed as connection "
                               "was not registered: %s",
                               connection_id)