code: def GetParentFileEntry(self):
      
      location = getattr(self.path_spec, 'location', None)
      if location is None:
        return None
  
      parent_location = self._file_system.DirnamePath(location)
      if parent_location is None:
        return None
  
      if parent_location == '':
        parent_location = self._file_system.PATH_SEPARATOR
  
      path_spec = os_path_spec.OSPathSpec(location=parent_location)
      return OSFileEntry(self._resolver_context, self._file_system, path_spec)
docs: Retrieves the parent file entry.
  
      Returns:
        OSFileEntry: parent file entry or None if not available.