def _exec_template(callable_, context, args=None, kwargs=None):
    template = context._with_template
    if template is not None and \
            (template.format_exceptions or template.error_handler):
        error = None
        try:
            callable_(context, *args, **kwargs)
        except Exception:
            _render_error(template, context, compat.exception_as())
        except:
            e = sys.exc_info()[0]
            _render_error(template, context, e)
    else:
        callable_(context, *args, **kwargs)
execute a rendering callable given the callable, a
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Mako-0.8.1/mako/runtime.py/_exec_template