def requires_dep(lib):
    def decorator(f):
        @functools.wraps(f)
        def wrapper(*args, **kwargs):
            dep = OPTIONAL_DEPS[lib]
            if not dep:
                raise_dep_error(lib)
            return f(*args, **kwargs)
        return wrapper
    return decorator
Decorator for functions that require a supported third-party library.
dataset/ETHPy150Open chop-dbhi/serrano/serrano/conf/__init__.py/requires_dep