code: def get_renderer(fmt):
      fmt = resolve_format(fmt)
      if isinstance(fmt, str):
          try:
              return _FORMATS[fmt]
          except KeyError:
              raise ValueError(f"unsupported format {fmt!r}")
      else:
          raise NotImplementedError(fmt)
  
imports: from collections import namedtuple
  import os.path
  import re
  import textwrap
  from c_common import tables
  from .None import REPO_ROOT
  from ._files import iter_header_files, iter_filenames
label_desc: Use image node_id 6 for calling a global function with example usage: get_renderer(fmt) and returns: _FORMATS