import jinja2


def render_template(path: str, data: dict) -> str:
    """
    Renders a template with given data.

    Parameters
    ----------
    path: str
        Path to the template
    data:
        The provided data for rendering

    Returns
    -------
    template: str
        Rendered template
    """
    with open(path, 'r+') as f:
        template = f.read()
    template = jinja2.Template(source=template)
    return template.render(data=data)