code: def samefile(self, other):
          
          if not hasattr(self.module, 'samefile'):
              other = Path(other).realpath().normpath().normcase()
              return self.realpath().normpath().normcase() == other
          return self.module.samefile(self, other)
docs: .. seealso:: :func:`os.path.samefile`