def template(value):
    if value is None:
        raise vol.Invalid('template value is None')

    value = str(value)
    try:
        jinja2.Environment().parse(value)
        return value
    except jinja2.exceptions.TemplateSyntaxError as ex:
        raise vol.Invalid('invalid template ({})'.format(ex))
Resultant algorithm in `K[x]` using subresultant PRS.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/config_validation.py/template--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py/dup_prs_resultant