code: def test_temp_file_lock(tmp_path, monkeypatch):
      """Test that the directory where temp file locks are saved can be configured
      via the env variable that configures the global Ray temp dir."""
      monkeypatch.setenv("RAY_TMPDIR", str(tmp_path))
      assert str(tmp_path) in ray._private.utils.get_user_temp_dir()
      with TempFileLock(path="abc.txt"):
          assert RAY_LOCKFILE_DIR in os.listdir(tmp_path)
          assert os.listdir(tmp_path / RAY_LOCKFILE_DIR)
  
imports: import os
  import pytest
  import ray
  from ray.air._internal.filelock import RAY_LOCKFILE_DIR, TempFileLock
label_desc: Use image node_id 1 for calling a global function with example usage: test_temp_file_lock(tmp_path, monkeypatch) without return types