def get_template_source(jinja2_env, template):
    """Returns the source text of the given `template`."""
    template_source, _, _ = jinja2_env.loader.get_source(jinja2_env, template)
    return template_source