          This is the list you would follow if removing the migrations from
          a database.
          """
          if node not in self.nodes:
              raise ValueError("Node %r not a valid node" % (node, ))
          return self.dfs(node, lambda x: self.dependents.get(x, set()))
  
      def root_nodes(self, app=None):
          """
          Returns all root nodes - that is, nodes with no dependencies inside
 
</s> remove             raise ValueError("Node %r not a valid node" % (node, ))
 </s> add             raise NodeNotFoundError("Node %r not a valid node" % (node, ), node) </s> remove             raise KeyError(
                "Migration %s dependencies reference nonexistent child node %r" % (migration, child)
 </s> add             raise NodeNotFoundError(
                "Migration %s dependencies reference nonexistent child node %r" % (migration, child),
                child </s> remove                     self.graph.add_dependency(migration, child, key)
 </s> add                     try:
                        self.graph.add_dependency(migration, child, key)
                    except NodeNotFoundError as e:
                        # Since we added "key" to the nodes before this implies
                        # "child" is not in there.
                        _reraise_missing_dependency(migration, child, e) </s> remove             raise KeyError(
                "Migration %s dependencies reference nonexistent parent node %r" % (migration, parent)
 </s> add             raise NodeNotFoundError(
                "Migration %s dependencies reference nonexistent parent node %r" % (migration, parent),
                parent
            raise NodeNotFoundError("Node %r not a valid node" % (node, ), node)
          This is the list you would follow if removing the migrations from
          a database.
          """
          if node not in self.nodes:
            raise NodeNotFoundError("Node %r not a valid node" % (node, ), node)
          return self.dfs(node, lambda x: self.dependents.get(x, set()))
  
      def root_nodes(self, app=None):
          """
          Returns all root nodes - that is, nodes with no dependencies inside
keep keep keep keep replace keep keep keep keep keep
 Fixed #23556 -- Raised a more meaningful error message when migrations refer to an unavailable node 
django/db/migrations/graph.py