code: def error(self, msg, include_line=True, include_source=True):
      lines = self.lines
      iline = self.iline - 1
      msg = "{}\n\n" "on {}".format(msg, self.name)
  
      if include_line and 0 <= iline < len(lines):
          line = lines[iline]
          msg += "\n" + 'at line {}: "{}"\n'.format(iline, line)
  
      if include_source:
          msg += "\n"
          msg += "docstring:\n"
          digits = int(math.floor(math.log10(len(lines)))) + 1
          linum_fmt = "{{:0{}d}} ".format(digits)
          for i, line in enumerate(lines):
              msg += linum_fmt.format(i) + line + "\n"
      raise InvalidDocstringError(msg, self, iline)
  
file_path: chainer/docs/source/_docstring_check.py
imports: import math
label_desc: Use image node_id 3 for calling the DocstringCheckContext obj's underlying member method code with example usage: obj.error(msg, include_line, include_source) without return types