def _get_unique_key(format_str, fn, *args, **kwargs):
    varnames = fn.func_code.co_varnames
    kwargs.update(dict(zip(varnames, args)))
    return ("{}-" + format_str).format(fn.__name__, **kwargs)
Converts a NestedDict instance into a real dictionary.
dataset/ETHPy150Open dimagi/commcare-hq/corehq/util/decorators.py/_get_unique_key--crossover with--dataset/ETHPy150Open softlayer/softlayer-python/SoftLayer/utils.py/NestedDict.to_dict