human
I wrote the below code

    @functools.wraps(func)
    def decorator(*args, **kwargs):
        if context.is_offline_mode():
            raise RuntimeError((_('%s    cannot    be    called    while    in    offline    mode') % func.__name__))
        return func(*args, **kwargs)
    return decorator

What's a good function header?
assistant
#Here's a good function header.

def raise_if_offline(func):