def dbcheck(exprstr, globals=None, locals=None):
    def decorate(func):
        expr = compile(exprstr, "dbcheck-%s" % func.__name__, "eval")
        def check(*args, **kwds):
            if not eval(expr, globals, locals):
                raise DbcheckError(exprstr, func, args, kwds)
            return func(*args, **kwds)
        return check
    return decorate

# -----------------------------------------------
Decorator to implement debugging assertions
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_decorators.py/dbcheck