docs: def get_template(name):
      """
      Return a copy of the template with the specified name. If not found, or an error occurs
      during the load, return None.
      """
      path = os.path.join(base_dir, name)
  
      if path not in templates:
          try:
              templates[path] = Template(path)
          except IOError:
              return None
  
      return copy.deepcopy(templates[path])