code: def errmsg(msg, doc, pos, end=None):
      lineno, colno = linecol(doc, pos)
      msg = msg.replace("%r", repr(doc[pos : pos + 1]))
      if end is None:
          fmt = "%s: line %d column %d (char %d)"
          return fmt % (msg, lineno, colno, pos)
      endlineno, endcolno = linecol(doc, end)
      fmt = "%s: line %d column %d - line %d column %d (char %d - %d)"
      return fmt % (msg, lineno, colno, endlineno, endcolno, pos, end)
  
label_desc: Use image node_id 2 for calling a global function with example usage: errmsg(msg, doc, pos, end) and returns: unknown, unknown