code: def samefile(file1, file2):
      # type: (str, str) -> bool
      
      if hasattr(os.path, 'samefile'):
          return os.path.samefile(file1, file2)
      else:
          path1 = os.path.normcase(os.path.abspath(file1))
          path2 = os.path.normcase(os.path.abspath(file2))
          return path1 == path2
docs: Provide an alternative for os.path.samefile on Windows/Python2