code: def test_lock_add_ttl(mongo_host: str) -> None:
      with MongoResource(
          database="test_lock_add_ttl",
          host=mongo_host,
          mongoengine_alias="queue",
      ):
          db = get_db(QUEUE_MONGOENGINE_ALIAS)
          db[QUEUE_COLLECTION_LOCKS].insert_many(
              [
                  {
                      "key": "key1",
                      "owner": "job_id1",
                      "created_at": "2022-01-01T00:00:00.000000Z",
                  },
                  {
                      "key": "key2",
                      "owner": None,
                      "created_at": "2022-01-01T00:00:00.000000Z",
                  },
                  {
                      "key": "key3",
                      "owner": "job_id3",
                      "ttl": 600,
                      "created_at": "2022-01-01T00:00:00.000000Z",
                  },
              ]
          )
  
          migration = MigrationAddTtlToQueueLock(
              version="20230825170200",
              description="add ttl field to locks",
          )
          migration.up()
  
          assert_ttl("key1", None)
          assert_ttl("key2", None)
          assert_ttl("key3", 600)
  
          migration.down()
          assert_ttl("key1", None)
          assert_ttl("key2", None)
          assert_ttl("key3", None)
  
          db[QUEUE_COLLECTION_LOCKS].drop()
  
imports: from typing import Optional
  from libcommon.constants import QUEUE_COLLECTION_LOCKS, QUEUE_MONGOENGINE_ALIAS
  from libcommon.resources import MongoResource
  from mongoengine.connection import get_db
  from mongodb_migration.migrations._20230825170200_lock_add_ttl import MigrationAddTtlToQueueLock
label_desc: Use image node_id 2 for calling a global function with example usage: test_lock_add_ttl(mongo_host) without return types