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: t.Union[
          str, os.PathLike, t.Sequence[t.Union[str, os.PathLike]]
      ],
  ) -> None:
      package_name = f"_jinja2_module_templates_{id(self):x}"
  
      # 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, str):
          path = [path]
  
      mod.__path__ = [os.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 importlib.util
  import os
  import posixpath
  import sys
  import pkgutil
  import typing
  import weakref
  import zipimport
  from collections import abc
  from hashlib import sha1
  from importlib import import_module
  from types import ModuleType
  from .exceptions import TemplateNotFound
  from .utils import internalcode
  from .utils import open_if_exists
  import __res
label_desc: Use image node_id 1 to create a new ModuleLoader object from inherited base classes: BaseLoader with example: obj = ModuleLoader(path)