human
I wrote the below code

    def real_decorator_wrapper(handler):
        def real_decorator_wrapper_fn(request, *args, **kwargs):
            if (Device.get_own_device().is_registered() or (not am_i_online())):
                return handler(request, *args, **kwargs)
            else:
                messages.warning(request, _(('In    order    to    access    %(resource_name)s,    you    must    register    your    device    first.' % {'resource_name': unicode(resource_name)})))
                return HttpResponseRedirect(set_query_params(reverse('register_public_key'), {'next': request.path}))
        return real_decorator_wrapper_fn
    return real_decorator_wrapper

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

def require_registration(resource_name):