class_docstr: Syft Lock implementations.
  
  Params:
      config: Config specific to a locking strategy.
code: def __init__(self, config: LockingConfig):
      self.config = config
  
      self.lock_name = config.lock_name
      self.namespace = config.namespace
      self.expire = config.expire
      self.timeout = config.timeout
      self.retry_interval = config.retry_interval
  
      self.passthrough = False
  
      self._lock: Optional[BaseLock] = None
  
      base_params = {
          "lock_name": config.lock_name,
          "namespace": config.namespace,
          "expire": config.expire,
          "timeout": config.timeout,
          "retry_interval": config.retry_interval,
      }
      if isinstance(config, NoLockingConfig):
          self.passthrough = True
      elif isinstance(config, ThreadingLockingConfig):
          self._lock = ThreadingLock(**base_params)
      elif isinstance(config, FileLockingConfig):
          client = config.client_path
          self._lock = PatchedFileLock(
              **base_params,
              client=client,
          )
      elif isinstance(config, RedisLockingConfig):
          client = redis.StrictRedis(**config.client.dict())
  
          self._lock = RedisLock(
              **base_params,
              client=client,
          )
      else:
          raise ValueError("Unsupported config type")
  
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 SyftLock object from inherited base classes: BaseLock with example: obj = SyftLock(config)