code: def redis_lock_store() -> Iterator[RedisLockStore]:
      # we need one redis database per worker, otherwise
      # tests conflicts with each others when databases are flushed
      pytest_worker_id = os.getenv("PYTEST_XDIST_WORKER", "gw0")
      redis_database = int(pytest_worker_id.replace("gw", ""))
      lock_store = RedisLockStore(
          REDIS_HOST, REDIS_PORT, redis_database
      )
      try:
          yield lock_store
      finally:
          lock_store.red.flushdb()
  
file_path: rasa/tests/integration_tests/core/conftest.py
imports: import os
  from typing import Iterator, Text
  import pytest
  import sqlalchemy
  from rasa.core.lock_store import RedisLockStore
label_desc: Use image node_id 1 for calling a global function with example usage: redis_lock_store() without return types