          graph.add_node(("app_b", "0001"), None)
          graph.add_dependency("app_a.0003", ("app_a", "0003"), ("app_a", "0002"))
          graph.add_dependency("app_a.0002", ("app_a", "0002"), ("app_a", "0001"))
          msg = "Migration app_a.0001 dependencies reference nonexistent parent node ('app_b', '0002')"
          with self.assertRaisesMessage(KeyError, msg):
              graph.add_dependency("app_a.0001", ("app_a", "0001"), ("app_b", "0002"))
  
      def test_missing_child_nodes(self):
          """
          Tests for missing child nodes.
 
</s> remove         with self.assertRaisesMessage(KeyError, msg):
 </s> add         with self.assertRaisesMessage(NodeNotFoundError, msg): </s> remove         with self.assertRaisesMessage(ValueError, message):
 </s> add         with self.assertRaisesMessage(NodeNotFoundError, message): </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             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 </s> remove         with self.assertRaisesMessage(ValueError, message):
 </s> add         with self.assertRaisesMessage(NodeNotFoundError, message):
        with self.assertRaisesMessage(NodeNotFoundError, msg):
          graph.add_node(("app_b", "0001"), None)
          graph.add_dependency("app_a.0003", ("app_a", "0003"), ("app_a", "0002"))
          graph.add_dependency("app_a.0002", ("app_a", "0002"), ("app_a", "0001"))
          msg = "Migration app_a.0001 dependencies reference nonexistent parent node ('app_b', '0002')"
        with self.assertRaisesMessage(NodeNotFoundError, msg):
              graph.add_dependency("app_a.0001", ("app_a", "0001"), ("app_b", "0002"))
  
      def test_missing_child_nodes(self):
          """
          Tests for missing child nodes.
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 
tests/migrations/test_graph.py