def _render_with_context(template_str: str, template: jinja2.Template, **kwargs: Any) -> str:
    'Store template being rendered in a ContextVar to aid error handling.'
    template_cv.set(template_str)
    return template.render(**kwargs)
Store template being rendered in a ContextVar to aid error handling.
def _render_with_context(template_str: str, template: jinja2.Template, **kwargs: Any) -> str:
    
    template_cv.set(template_str)
    return template.render(**kwargs)