code: def produce_upgrade_operations(
          ctx=None, metadata=None, include_symbol=None, include_object=None,
          **kwargs):
      
      if metadata is None:
          # Note, all SQLAlchemy models must have been loaded to produce
          # accurate results.
          metadata = db.metadata
      if ctx is None:
          ctx = create_migration_ctx(target_metadata=metadata, **kwargs)
  
      template_args = {}
      imports = set()
  
      _produce_migration_diffs(
          ctx, template_args, imports,
          include_object=include_object,
          include_symbol=include_symbol,
          **kwargs
      )
  
      return template_args
docs: Produce a list of upgrade statements.