def allow_lazy(func, *resultclasses):
    def wrapper(*args, **kwargs):
        for arg in list(args) + kwargs.values():
            if isinstance(arg, Promise):
                break
        else:
            return func(*args, **kwargs)
        return lazy(func, *resultclasses)(*args, **kwargs)
    return wraps(func)(wrapper)
A decorator that allows a function to be called with one or more lazy
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/utils/functional.py/allow_lazy