code: def warn(self, msg):
          
          self.warnings.append(
              self.state.document.reporter.warning(msg, line=self.lineno)
          )
docs: Add a warning message.
  
          :param msg: The warning message to add.
          :type msg: str