def get_yaql_interpreter(self, node_id):
        context = self._yaql_context.create_child_context()
        context['$%new'] = self._transaction.get_new_data(node_id)
        context['$%old'] = self._transaction.get_old_data(node_id)
        cache = self._yaql_expressions_cache

        def evaluate(expression):
            logger.debug("evaluate yaql expression: %s", expression)
            try:
                parsed_exp = cache[expression]
            except __HOLE__:
                parsed_exp = self._yaql_engine(expression)
                cache[expression] = parsed_exp
            return parsed_exp.evaluate(data=context['$%new'], context=context)
        return evaluate
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/lcm/task_serializer.py/Context.get_yaql_interpreter