code: def absnormpath(self, path):
          
          path = self.normcase(path)
          cwd = self._matching_string(path, self.cwd)
          if not path:
              path = self.path_separator
          elif not self._starts_with_root_path(path):
              # Prefix relative paths with cwd, if cwd is not root.
              root_name = self._matching_string(path, self.root.name)
              empty = self._matching_string(path, '')
              path = self._path_separator(path).join(
                  (cwd != root_name and cwd or empty, path))
          if path == self._matching_string(path, '.'):
              path = cwd
          return self.normpath(path)
docs: Absolutize and minimalize the given path.
  
          Forces all relative paths to be absolute, and normalizes the path to
          eliminate dot and empty components.
  
          Args:
              path:  Path to normalize.
  
          Returns:
              The normalized path relative to the current working directory,
              or the root directory if path is empty.