code: def add_peer(self, peerAddr, networks=None):
          
          if _debug: BTR._debug("add_peer %r networks=%r", peerAddr, networks)
  
          # see if this is already a peer
          if peerAddr in self.peers:
              # add the (new?) reachable networks
              if not networks:
                  networks = []
              else:
                  self.peers[peerAddr].extend(networks)
          else:
              if not networks:
                  networks = []
  
              # save the networks
              self.peers[peerAddr] = networks
docs: Add a peer and optionally provide a list of the reachable networks.