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

    if isinstance(n, int):
        structure = args[n]
        is_arg = True
    elif isinstance(n, str):
        structure = kwargs[n]
        is_arg = False
    def f_reduced(x):
        if hasattr(x, '__iter__'):
            return list(map(f_reduced, x))
        else:
            if is_arg:
                args[n] = x
            else:
                kwargs[n] = x
            return f(*args, **kwargs)
    return list(map(f_reduced, structure))

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

def apply_on_element(f, args, kwargs, n):