code: def _Open(self, path_spec, mode='rb'):
      
      if not path_spec.HasParent():
        raise errors.PathSpecError(
            'Unsupported path specification without parent.')
  
      compression_method = getattr(path_spec, 'compression_method', None)
      if not compression_method:
        raise errors.PathSpecError(
            'Unsupported path specification without compression method.')
  
      self._compression_method = compression_method
docs: Opens the file system defined by path specification.
  
      Args:
        path_spec (PathSpec): a path specification.
        mode (Optional[str]): file access mode. The default is 'rb' which
            represents read-only binary.
  
      Raises:
        AccessError: if the access to open the file was denied.
        IOError: if the file system could not be opened.
        PathSpecError: if the path specification is incorrect.
        ValueError: if the path specification is invalid.