class_docstr: Implementation of lock with the file system as the backend for synchronization.
  This version patches for the `FileLock._expiry_time` crash(https://github.com/py-sherlock/sherlock/issues/71)
  
  `sherlock.FileLock` might not work as expected for Python threads.
  It uses re-entrant OS locks, meaning that multiple Python threads could acquire the lock at the same time.
  For different processes/OS threads, the file lock will work as expected.
  We need to patch the lock to handle Python threads too.
code: def __init__(self, *args, **kwargs) -> None:
      self._lock_file_enabled = True
      try:
          super().__init__(*args, **kwargs)
      except BaseException as e:
          print(
              f"Failed to create a file lock = {e}. Using memory-lock only"
          )
          self._lock_file_enabled = False
  
      self._lock_py_thread = ThreadingLock(*args, **kwargs)
  
imports: from collections import defaultdict
  import datetime
  import json
  from pathlib import Path
  import threading
  import time
  from typing import Callable
  from typing import Dict
  from typing import Optional
  import uuid
  from pydantic import BaseModel
  import redis
  from sherlock.lock import BaseLock
  from sherlock.lock import FileLock
  from sherlock.lock import RedisLock
  from ..serde.serializable import serializable
label_desc: Use image node_id 1 to create a new PatchedFileLock object from inherited base classes: FileLock with example: obj = PatchedFileLock()