class_docstr: This loader loads templates from precompiled templates.
  
  Example usage:
  
  >>> loader = ChoiceLoader([
  ...     ModuleLoader('/path/to/compiled/templates'),
  ...     FileSystemLoader('/path/to/templates')
  ... ])
  
  Templates can be precompiled with :meth:`Environment.compile_templates`.
class_docstr_tok: ["This","loader","loads","templates","from","precompiled","templates",".","Example","usage",":",">",">",">","loader","=","ChoiceLoader","(","[","...","ModuleLoader","(","'\/path\/to\/compiled\/templates","'",")",",","...","FileSystemLoader","(","'\/path\/to\/templates","'",")","...","]",")","Templates","can","be","precompiled","with",":","meth",":","`","Environment.compile_templates","`","."]
code: def __init__(self, path):
      package_name = "_jinja2_module_templates_%x" % id(self)
  
      # create a fake module that looks for the templates in the
      # path given.
      mod = _TemplateModule(package_name)
  
      if not isinstance(path, abc.Iterable) or isinstance(
          path, string_types
      ):
          path = [path]
  
      mod.__path__ = [fspath(p) for p in path]
  
      sys.modules[package_name] = weakref.proxy(
          mod, lambda x: sys.modules.pop(package_name, None)
      )
  
      # the only strong reference, the sys.modules entry is weak
      # so that the garbage collector can remove it once the
      # loader that created it goes out of business.
      self.module = mod
      self.package_name = package_name
  
imports: import os
  import sys
  import weakref
  from hashlib import sha1
  from os import path
  from types import ModuleType
  from ._compat import abc
  from ._compat import fspath
  from ._compat import iteritems
  from ._compat import string_types
  from .exceptions import TemplateNotFound
  from .utils import internalcode
  from .utils import open_if_exists
label_desc: Use image node_id 1 to create a new ModuleLoader object from inherited base classes: BaseLoader with example: obj = ModuleLoader(path)