code: def is_same_file(path1, path2):
      
      return (
          path1 and path2
          and os.path.isfile(path1) and os.path.isfile(path2)
          and os.path.samefile(path1, path2))
docs: Return True if path1 is the same file as path2.
  
      The reason for this dance is that samefile throws if either file doesn't
      exist.
  
      Args:
          path1: str or path-like.
          path2: str or path-like.
  
      Returns:
          bool. True if the same file, False if not.