code: def _Open(self, path_spec=None, mode='rb'):
      
      if not self._file_object_set_in_init and not path_spec:
        raise ValueError('Missing path specification.')
  
      if self._file_object_set_in_init:
        return
  
      self._file_object = self._OpenFileObject(path_spec)
      if not self._file_object:
        raise IOError('Unable to open missing file-like object.')
docs: Opens the file-like object defined by path specification.
  
      Args:
        path_spec (Optional[PathSpec]): path specification.
        mode (Optional[str]): file access mode.
  
      Raises:
        AccessError: if the access to open the file was denied.
        IOError: if the file-like object could not be opened.
        OSError: if the file-like object could not be opened.
        PathSpecError: if the path specification is incorrect.
        ValueError: if the path specification is invalid.