docs: def _compose_cheetah_template_map(cache):
      """
      does the work of composing the cheetah template map into the given
      cache
      """
  
      from .cheetah import get_templates
  
      # pylint: disable=W0406
      # needed for introspection
      import javatools
  
      for template_type in get_templates():
          if "_" not in template_type.__name__:
              # we use the _ to denote package and class names. So any
              # template without a _ in the name isn't meant to be
              # matched to a change type.
              continue
  
          # get the package and change class names based off of the
          # template class name
          tn = template_type.__name__
          pn, cn = tn.split("_", 1)
  
          # get the package from javatools
          pk = getattr(javatools, pn, None)
          if pk is None:
              __import__("javatools." + pn)
              pk = getattr(javatools, pn, None)
  
          # get the class from the package
          cc = getattr(pk, cn, None)
          if cc is None:
              raise Exception("no change class for template %s" % tn)
  
          # associate a Change class with a Template class
          cache[cc] = template_type
  
      return cache