def decorate_all_in_class(klass: Type, decorator: FunctionType, whitelist: list):
    '\n    Decorate all functions in a class with the specified decorator\n    :param klass: The class to interrogate\n    :param decorator: The decorator to apply\n    :param whitelist: Functions not to be decorated.\n    '
    for name in dir(klass):
        if (name not in whitelist):
            obj = getattr(klass, name)
            if (isinstance(obj, FunctionType) or asyncio.iscoroutinefunction(obj)):
                logger.debug(f'Adding metrics to {klass}:{name}')
                setattr(klass, name, decorator(obj))
            else:
                logger.debug(f'No metrics on {klass}:{name} because it is not a coroutine or function')
Decorate all functions in a class with the specified decorator
:param klass: The class to interrogate
:param decorator: The decorator to apply
:param whitelist: Functions not to be decorated.
def decorate_all_in_class(klass: Type, decorator: FunctionType, whitelist: list):
    '\n    Decorate all functions in a class with the specified decorator\n    :param klass: The class to interrogate\n    :param decorator: The decorator to apply\n    :param whitelist: Functions not to be decorated.\n    '
    for name in dir(klass):
        if (name not in whitelist):
            obj = getattr(klass, name)
            if (isinstance(obj, FunctionType) or asyncio.iscoroutinefunction(obj)):
                logger.debug(f'Adding metrics to {klass}:{name}')
                setattr(klass, name, decorator(obj))
            else:
                logger.debug(f'No metrics on {klass}:{name} because it is not a coroutine or function')