code: def warning(self, message, *args, **kwargs):
          
          warncls = kwargs.pop('warning', None)
          if warncls and self.raise_warnings:
              warnings.warn(message, warncls)
  
          return self.log(logging.WARNING, message, *args, **kwargs)
docs: Specialized warnings system. If a warning subclass is passed into
          the keyword arguments and raise_warnings is True - the warnning will
          be passed to the warnings module.