code: def test_redis_lock_timeout(timeout, check_interval):
      connection = client.Redis()
      channel = str(random.random())
      lock_a = redis.RedisLock(channel)
      lock_a.acquire(timeout=timeout, check_interval=check_interval)
  
      lock_b = redis.RedisLock(channel, connection=connection)
      with pytest.raises(portalocker.AlreadyLocked):
          try:
              lock_b.acquire(
                  timeout=timeout, check_interval=check_interval
              )
          finally:
              lock_a.release()
              lock_a.connection.close()
  
file_path: catboost/contrib/python/portalocker/py3/tests/test_redis.py
imports: import _thread
  import logging
  import random
  import time
  import pytest
  from redis import client
  from redis import exceptions
  import portalocker
  from portalocker import redis
  from portalocker import utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_redis_lock_timeout(timeout, check_interval) without return types