code: def get_peers(self):
          
          node = NodeLeader.Instance()
          result = {"connected": [], "unconnected": [], "bad": []}
          connected_peers = []
  
          for peer in node.Peers:
              result['connected'].append({"address": peer.host,
                                          "port": peer.port})
              connected_peers.append("{}:{}".format(peer.host, peer.port))
  
          for addr in node.DEAD_ADDRS:
              host, port = addr.rsplit(':', 1)
              result['bad'].append({"address": host, "port": port})
  
          # "UnconnectedPeers" is never used. So a check is needed to
          # verify that a given address:port does not belong to a connected peer
          for addr in node.KNOWN_ADDRS:
              host, port = addr.rsplit(':', 1)
              if addr not in connected_peers:
                  result['unconnected'].append({"address": host,
                                                "port": int(port)})
  
          return result
docs: Get all known nodes and their 'state'