from typing import Any
import jinja2


def _render_jinja2(filename: str, **kwargs: Any) -> str:
  """Returns a rendered template.

  Args:
    filename: Template filename.
    **kwargs: Template environment.
  """
  with open(filename, 'r') as fh:
    template = jinja2.Template(fh.read(), autoescape=False)
  return template.render(**kwargs)