Function func(*args, **kwargs) should return dictionary, and all elements of that dictionary should be numeric or string variables.
If argument of function is dictionary, then function should return dictionary with all elements of argument dictionary, and other arguments.
For example:
arg1 = { 'x': 'X', 'y': 'Y' }
arg2 = 2
arg3 = { 'p': arg1, 'pi': 3.14 }
func(arg2, arg3, arg4=4)
should return this:
{ 'x': 'X', 'y': 'Y', 'arg2': 2, 'pi': 3.14, 'arg4': 4 }
How to do that? Recursion is not desirable.
func(*args)won't be able to determine and return the namearg2!localswon't help you. Only a stack trace would, but please for the love of all that is holy don't go there.