code: def create_migration_ctx(**kwargs):
      
      env = EnvironmentContext(Config(), None)
      env.configure(
          connection=db.engine.connect(),
          sqlalchemy_module_prefix='db.',
          **kwargs
      )
      return env.get_context()
docs: Create an alembic migration context.