  import sys
  
  from django.apps import apps
  from django.db.migrations.recorder import MigrationRecorder
  from django.db.migrations.graph import MigrationGraph
  from django.utils import six
  from django.conf import settings
  
  
  MIGRATIONS_MODULE_NAME = 'migrations'
 
</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 MigrationGraph, NodeNotFoundError
  import sys
  
  from django.apps import apps
  from django.db.migrations.recorder import MigrationRecorder
from django.db.migrations.graph import MigrationGraph, NodeNotFoundError
  from django.utils import six
  from django.conf import settings
  
  
  MIGRATIONS_MODULE_NAME = 'migrations'
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/loader.py