code: def ProduceExtractionWarning(self, message, path_spec=None):
      
      if not self._storage_writer:
        raise RuntimeError('Storage writer not set.')
  
      if not path_spec and self._file_entry:
        path_spec = self._file_entry.path_spec
  
      parser_chain = self.GetParserChain()
      warning = warnings.ExtractionWarning(
          message=message, parser_chain=parser_chain, path_spec=path_spec)
      self._storage_writer.AddWarning(warning)
      self._number_of_warnings += 1
  
      self.last_activity_timestamp = time.time()
docs: Produces an extraction warning.
  
      Args:
        message (str): message of the warning.
        path_spec (Optional[dfvfs.PathSpec]): path specification, where None
            will use the path specification of current file entry set in
            the mediator.
  
      Raises:
        RuntimeError: when storage writer is not set.