class_docstr: This class is used to inspect the file system state and determine if the
  file being created can use `fcntl` / `flock` or should use soft file locks.
  
  This can be achieved by finding the device owning the parent directory and
  mapping it to the partition and finally checking the filesystem type.
  
  We prefer using soft file locks *only* if there is a risk of the filesystem
  not being able to handle `fcntl` implementations.
  (e.g. remote filesystems, including NFS<4, BeeGFS, Lustre, etc.)
docstr: Returns the device id and the filesystem type of the file / directory
  at the given path.
  
  If the path does not exist, `None` is returned.
docstr_tok: ["Returns","the","device","id","and","the","filesystem","type","of","the","file","\/","directory","at","the","given","path",".","If","the","path","does","not","exist",",","`","None","`","is","returned","."]
code: def get_fs(cls, path: str) -> Tuple[Optional[int], Optional[str]]:
      """
      Returns the device id and the filesystem type of the file / directory
      at the given path.
  
      If the path does not exist, `None` is returned.
      """
      try:
          stat = os.stat(path)
      except (OSError, ValueError, AttributeError):
          return None, None
  
      return stat.st_dev, cls.dev_fstype_mapping().get(stat.st_dev)
  
imports: import os
  import logging
  import pathlib
  import threading
  import uuid
  import time
  from filelock import BaseFileLock, SoftFileLock, UnixFileLock, has_fcntl
  from cachetools.func import ttl_cache
  from psutil import disk_partitions
  from typing import Optional, Union, Dict, Set, Tuple
label_desc: Use image node_id 3 for calling the FileSystemInspector obj's underlying member method code with example usage: obj.get_fs(cls, path) and returns: stat,  cls, None,  None