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
        is_root = True
        is_virtual = True
      else:
        is_root = False
        is_virtual = False
  
      parent_path_spec = getattr(self.path_spec, 'parent', None)
      path_spec = tar_path_spec.TARPathSpec(
          location=parent_location, parent=parent_path_spec)
      return TARFileEntry(
          self._resolver_context, self._file_system, path_spec, is_root=is_root,
          is_virtual=is_virtual)
docs: Retrieves the parent file entry.
  
      Returns:
        TARFileEntry: parent file entry or None.