docs: def is_isolated(self, p_id):
          """
          Returns True iff the given node has no incoming or outgoing edges.
          """
          return(len(self.incoming_neighbors(p_id)) == 0
                 and len(self.outgoing_neighbors(p_id)) == 0)