code: def clear(self):
          
          try:
              for peer in self._peers.values():
                  peer.close()
          finally:
              self._peers = {}
              self._resetting = False
docs: Reset this PeerGroup.
  
          This closes all connections to all known peers and forgets about
          these peers.
  
          :returns:
              A Future that resolves with a value of None when the operation
              has finished