@functools.wraps(fcn)
def recursive_wrapper(inp, **kwargs):
    ' Wrap the processing function to call it recursivelyy for nested data structures. '
    kwargs.update({fcn_arg_name: inp})
    if isinstance(inp, fcn_arg_types):
        inp = fcn(**kwargs)
    elif isinstance(inp, dict):
        for (key, value) in inp.items():
            if isinstance(value, fcn_arg_types):
                inp[key] = recursive_wrapper(value, **kwargs)
            else:
                inp[key] = value
    elif isinstance(inp, list):
        for (idx, item) in enumerate(inp):
            if isinstance(item, fcn_arg_types):
                inp[idx] = recursive_wrapper(item, **kwargs)
            else:
                inp[idx] = item
    return inp
Wrap the processing function to call it recursivelyy for nested data structures.
@functools.wraps(fcn)
def recursive_wrapper(inp, **kwargs):
    '  '
    kwargs.update({fcn_arg_name: inp})
    if isinstance(inp, fcn_arg_types):
        inp = fcn(**kwargs)
    elif isinstance(inp, dict):
        for (key, value) in inp.items():
            if isinstance(value, fcn_arg_types):
                inp[key] = recursive_wrapper(value, **kwargs)
            else:
                inp[key] = value
    elif isinstance(inp, list):
        for (idx, item) in enumerate(inp):
            if isinstance(item, fcn_arg_types):
                inp[idx] = recursive_wrapper(item, **kwargs)
            else:
                inp[idx] = item
    return inp