code: def _OpenFileObject(self, path_spec):
      
      if not path_spec.HasParent():
        raise errors.PathSpecError(
            'Unsupported path specification without parent.')
  
      resolver.Resolver.key_chain.ExtractCredentialsFromPathSpec(path_spec)
  
      file_object = resolver.Resolver.OpenFileObject(
          path_spec.parent, resolver_context=self._resolver_context)
      bde_volume = pybde.volume()
  
      bde.BDEVolumeOpen(
          bde_volume, path_spec, file_object, resolver.Resolver.key_chain)
      return bde_volume
docs: Opens the file-like object defined by path specification.
  
      Args:
        path_spec (PathSpec): path specification.
  
      Returns:
        pyvde.volume: BDE volume file-like object.
  
      Raises:
        PathSpecError: if the path specification is incorrect.