human
I wrote the below code

    if (not func):
        return partial(redirect_in_maintenance_mode, methods=methods)
    @wraps(func)
    def wrapped(request, *args, **kwargs):
        if (settings.MAINTENANCE_MODE and ((methods is None) or (request.method in methods))):
            return redirect('maintenance_mode')
        return func(request, *args, **kwargs)
    return wrapped

What's a good function header?

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

def redirect_in_maintenance_mode(func=None, methods=None):