code: def AddWarning(self, warning):
      
      self._RaiseIfNotWritable()
  
      warning = self._PrepareAttributeContainer(warning)
  
      self._warnings.append(warning)
      self.number_of_warnings += 1
docs: Adds a warnings.
  
      Args:
        warning (ExtractionWarning): warning.
  
      Raises:
        IOError: when the storage writer is closed.
        OSError: when the storage writer is closed.