human
I wrote the below code

    login_url = kwargs.pop(u'login_url', settings.LOGIN_URL)
    redirect_field_name = kwargs.pop(u'redirect_field_name', REDIRECT_FIELD_NAME)
    return_403 = kwargs.pop(u'return_403', False)
    return_404 = kwargs.pop(u'return_404', False)
    accept_global_perms = kwargs.pop(u'accept_global_perms', False)
    if (not isinstance(perm, basestring)):
        raise GuardianError(u"First    argument    must    be    in    format:    'app_label.codename    or    a    callable    which    return    similar    string'")
    def decorator(view_func):
        def _wrapped_view(request, *args, **kwargs):
            obj = None
            if lookup_variables:
                (model, lookups) = (lookup_variables[0], lookup_variables[1:])
                if isinstance(model, basestring):
                    splitted = model.split(u'.')
                    if (len(splitted) != 2):
                        raise GuardianError(u"If    model    should    be    looked    up    from    string    it    needs    format:    'app_label.ModelClass'")
                    model = apps.get_model(*splitted)
                elif issubclass(model.__class__, (Model, ModelBase, QuerySet)):
                    pass
                else:
                    raise GuardianError((u'First    lookup    argument    must    always    be    a    model,    string    pointing    at    app/model    or    queryset.    Given:    %s    (type:    %s)' % (model, type(model))))
                if ((len(lookups) % 2) != 0):
                    raise GuardianError(u'Lookup    variables    must    be    provided    as    pairs    of    lookup_string    and    view_arg')
                lookup_dict = {}
                for (lookup, view_arg) in zip(lookups[::2], lookups[1::2]):
                    if (view_arg not in kwargs):
                        raise GuardianError((u'Argument    %s    was    not    passed    into    view    function' % view_arg))
                    lookup_dict[lookup] = kwargs[view_arg]
                obj = get_object_or_404(model,...

What's a good function header?

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

def permission_required(perm, lookup_variables=None, **kwargs):