def _process_condition(center, config_block):
    """Return a function that parses the condition."""
    if CONF_TYPE in config_block:
        checks = []
        condition_type = config_block[CONF_TYPE]
        conditions = config_block[CONF_CONDITIONS]
        for cond in conditions:
            check = _process_condition(center, cond)
            checks.append(check)
        return make_checker(condition_type, checks)

    data = config_block[CONF_CONDITION]
    template = make_template(center, data)
    return partial(render_template, template)