code: def downgrades(src):
      """Decorator for marking that a method is a downgrade to a version to the
      previous version.
  
      Parameters
      ----------
      src : int
          The version this downgrades from.
  
      Returns
      -------
      decorator : callable[(callable) -> callable]
          The decorator to apply.
      """
  
      def _(f):
          destination = src - 1
  
          @do(op.setitem(_downgrade_methods, destination))
          @wraps(f)
          def wrapper(op, conn, version_info_table):
              conn.execute(
                  version_info_table.delete()
              )  # clear the version
              f(op)
              write_version_info(conn, version_info_table, destination)
  
          return wrapper
  
      return _
  
file_path: catalyst/catalyst/assets/asset_db_migrations.py
imports: from functools import wraps
  from alembic.migration import MigrationContext
  from alembic.operations import Operations
  import sqlalchemy
  from toolz.curried import do, operator
  from catalyst.assets.asset_writer import write_version_info
  from catalyst.errors import AssetDBImpossibleDowngrade
  from catalyst.utils.preprocess import preprocess
  from catalyst.utils.sqlite_utils import coerce_string_to_eng
label_desc: Use image node_id 3 for calling a global function with example usage: downgrades(src) and returns: _, wrapper