human
Here's a good function header given the following:
I wrote the below code

    @decorator
    def _nodes_or_number(f, *args, **kw):
        try:
            iter_wa = iter(which_args)
        except TypeError:
            iter_wa = (which_args,)
        new_args = list(args)
        for i in iter_wa:
            n = args[i]
            try:
                nodes = list(range(n))
            except TypeError:
                nodes = tuple(n)
            else:
                if (n < 0):
                    msg = ('Negative    number    of    nodes    not    valid:    %i' % n)
                    raise nx.NetworkXError(msg)
            new_args[i] = (n, nodes)
        return f(*new_args, **kw)
    return _nodes_or_number

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

def nodes_or_number(which_args):