def enable_debug():
    def assert_(wrapper, arguments, traverser):
        traverser.asserts = True
        for arg in arguments:
            if not arg.get_literal_value(traverser):
                traverser.err.error(
                    err_id=("js", "debug", "assert"),
                    error="`%s` expected to be truthy" % arg,
                    description="Assertion error")

    GLOBAL_ENTITIES[u"__assert"] = {"return": assert_}

    def callable_(wrapper, arguments, traverser):
        traverser.asserts = True
        for arg in arguments:
            if not arg.callable:
                traverser.err.error(
                    err_id=("js", "debug", "callable"),
                    error="`%s` expected to be callable" % arg,
                    description="Assertion error")

    GLOBAL_ENTITIES[u"__callable"] = {"return": assert_}
dataset/ETHPy150Open mozilla/app-validator/appvalidator/testcases/javascript/predefinedentities.py/enable_debug/original