code: def test_cache_deletion_migration(mongo_host: str) -> None:
      kind = "cache_kind"
      with MongoResource(
          database="test_cache_delete_migration",
          host=mongo_host,
          mongoengine_alias=CACHE_MONGOENGINE_ALIAS,
      ):
          db = get_db(CACHE_MONGOENGINE_ALIAS)
          db[CACHE_COLLECTION_RESPONSES].insert_many(
              [{"kind": kind, "dataset": "dataset", "http_status": 200}]
          )
          assert db[CACHE_COLLECTION_RESPONSES].find_one(
              {"kind": kind}
          )  # Ensure there is at least one record to delete
  
          migration = CacheDeletionMigration(
              cache_kind=kind,
              version="20230505180100",
              description=f"remove cache for kind {kind}",
          )
          migration.up()
  
          assert not db[CACHE_COLLECTION_RESPONSES].find_one(
              {"kind": kind}
          )  # Ensure 0 records with old kind
  
          db[CACHE_COLLECTION_RESPONSES].drop()
  
file_path: datasets-server/jobs/mongodb_migration/tests/test_deletion_migrations.py
imports: import pytest
  from libcommon.constants import CACHE_COLLECTION_RESPONSES, CACHE_METRICS_COLLECTION, CACHE_MONGOENGINE_ALIAS, METRICS_MONGOENGINE_ALIAS, QUEUE_COLLECTION_JOBS, QUEUE_METRICS_COLLECTION, QUEUE_MONGOENGINE_ALIAS
  from libcommon.queue import JobDocument
  from libcommon.resources import MongoResource
  from libcommon.utils import Status, get_datetime
  from mongoengine.connection import get_db
  from pytest import raises
  from mongodb_migration.deletion_migrations import CacheDeletionMigration, MetricsDeletionMigration, MigrationDeleteJobsByStatus, MigrationQueueDeleteTTLIndex, MigrationRemoveFieldFromCache, MigrationRemoveFieldFromJob, QueueDeletionMigration, get_index_names
  from mongodb_migration.migration import IrreversibleMigrationError
label_desc: Use image node_id 1 for calling a global function with example usage: test_cache_deletion_migration(mongo_host) without return types