code: def GetParentFileEntry(self):
      
      location = getattr(self.path_spec, 'location', None)
      if location is None:
        return None
      parent_inode = self._parent_inode
      parent_location = self._file_system.DirnamePath(location)
      if parent_inode is None and parent_location is None:
        return None
  
      if parent_location == '':
        parent_location = self._file_system.PATH_SEPARATOR
  
      root_inode = self._file_system.GetRootInode()
      is_root = bool(
          parent_location == self._file_system.LOCATION_ROOT or (
              parent_inode is not None and root_inode is not None and
              parent_inode == root_inode))
  
      parent_path_spec = getattr(self.path_spec, 'parent', None)
      path_spec = tsk_path_spec.TSKPathSpec(
          inode=parent_inode, location=parent_location, parent=parent_path_spec)
      return TSKFileEntry(
          self._resolver_context, self._file_system, path_spec, is_root=is_root)
docs: Retrieves the parent file entry.
  
      Returns:
        TSKFileEntry: parent file entry or None.