code: def check(mod):
      """Check the parsed ASDL tree for correctness.
  
      Return True if success. For failure, the errors are printed out and False
      is returned.
      """
      v = Check()
      v.visit(mod)
  
      for t in v.types:
          if t not in mod.types and not t in builtin_types:
              v.errors += 1
              uses = ", ".join(v.types[t])
              print("Undefined type {}, used in {}".format(t, uses))
      return not v.errors
  
imports: from collections import namedtuple
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: check(mod) and returns: unknown