class_docstr: FileLock wrapper that uses temporary file locks.
  
  The temporary directory that these locks are saved to can be configured via
  the `RAY_TMPDIR` environment variable.
  
  Args:
      path: The file path that this temporary file lock is used for.
          This will be used to generate the lockfile filename.
          Ex: For concurrent writes to a file, this is the common filepath
          that multiple processes are writing to.
      **kwargs: Additional keyword arguments to pass to the underlying `FileLock`.
code: def __init__(self, path: str, **kwargs):
      self.path = path
      temp_dir = Path(ray._private.utils.get_user_temp_dir()).resolve()
      self._lock_dir = temp_dir / RAY_LOCKFILE_DIR
      self._path_hash = hashlib.sha1(
          str(Path(self.path).resolve()).encode("utf-8")
      ).hexdigest()
      self._lock_path = self._lock_dir / f"{self._path_hash}.lock"
  
      os.makedirs(str(self._lock_dir), exist_ok=True)
      self._lock = FileLock(self._lock_path, **kwargs)
  
file_path: ray/python/ray/air/_internal/filelock.py
imports: from filelock import FileLock
  import hashlib
  import os
  from pathlib import Path
  import ray
label_desc: Use image node_id 1 to create a new TempFileLock object  with example: obj = TempFileLock(path)