  from django.test import TestCase, override_settings
  from django.db import connection, connections
  from django.db.migrations.loader import MigrationLoader, AmbiguityError
  from django.db.migrations.recorder import MigrationRecorder
  from django.test import modify_settings
  from django.utils import six
  
  
 
</s> remove from django.db.migrations.graph import MigrationGraph
 </s> add from django.db.migrations.graph import MigrationGraph, NodeNotFoundError </s> remove from django.db.migrations.graph import MigrationGraph, CircularDependencyError
 </s> add from django.db.migrations.graph import CircularDependencyError, MigrationGraph, NodeNotFoundError </s> remove from django.utils.datastructures import OrderedSet
 </s> add  </s> remove             raise ValueError("Node %r not a valid node" % (node, ))
 </s> add             raise NodeNotFoundError("Node %r not a valid node" % (node, ), node)
from django.db.migrations.graph import NodeNotFoundError
  from django.test import TestCase, override_settings
  from django.db import connection, connections
from django.db.migrations.graph import NodeNotFoundError
  from django.db.migrations.loader import MigrationLoader, AmbiguityError
  from django.db.migrations.recorder import MigrationRecorder
  from django.test import modify_settings
  from django.utils import six
  
  
keep add keep keep keep keep keep keep
 Fixed #23556 -- Raised a more meaningful error message when migrations refer to an unavailable node 
tests/migrations/test_loader.py