human
I wrote the below code

    @require_login
    def require_admin_wrapper_fn(request, *args, **kwargs):
        if ((settings.CENTRAL_SERVER and request.user.is_authenticated()) or getattr(request, 'is_admin', False)):
            return handler(request, *args, **kwargs)
        facility_user_id = kwargs.get('facility_user_id')
        if (request.session.get('facility_user') and (facility_user_id == request.session.get('facility_user').id)):
            return handler(request, *args, **kwargs)
        raise PermissionDenied(_('You    must    be    logged    in    as    an    admin    to    access    this    page.'))
    return require_admin_wrapper_fn

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

def require_admin(handler):