<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove(self, hostport):
 """Delete the Peer for the given host port. Does nothing if a matching Peer does not exist. :returns: The removed Peer """

        assert hostport, "hostport is required"
        peer = self._peers.pop(hostport, None)
        peer_in_heap = peer and peer.index != -1
        if peer_in_heap:
            self.peer_heap.remove_peer(peer)
        return peer