class_docstr: Interfaces the rendering environment of jinja2 for use in Sphinx.
class_docstr_tok: ["Interfaces","the","rendering","environment","of","jinja2","for","use","in","Sphinx","."]
code: def get_source(
      self, environment: Environment, template: str
  ) -> tuple[str, str, Callable]:
      loaders = self.loaders
      # exclamation mark starts search from theme
      if template.startswith("!"):
          loaders = loaders[self.templatepathlen :]
          template = template[1:]
      for loader in loaders:
          try:
              return loader.get_source(environment, template)
          except TemplateNotFound:
              pass
      msg = f"{template!r} not found in {self.environment.loader.pathchain}"
      raise TemplateNotFound(msg)
  
imports: from __future__ import annotations
  from os import path
  from pprint import pformat
  from typing import TYPE_CHECKING, Any, Callable
  from jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound
  from jinja2.sandbox import SandboxedEnvironment
  from jinja2.utils import open_if_exists
  from sphinx.application import TemplateBridge
  from sphinx.util import logging
  from sphinx.util.osutil import mtimes_of_files
label_desc: Use image node_id 5 for calling the BuiltinTemplateLoader obj's underlying member method code with example usage: obj.get_source(environment, template) and returns: loader