

@memoized
def get_template_variable(self, slug):
    matches = filter((lambda var: (var.slug == slug)), var.template_vars)
    if (len(matches) == 1):
        return matches[0]
    else:
        raise MissingTemplateError(_("Couldn't match with slug {}").format(slug))

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/performance_sms/query_engine.py QueryEngine.get_template_variable/VarMisuse@32/36 `self`->`var`