def METHOD_NAME(d, char="@", ignore_keys=frozenset()):
    """
    Modify a dictionary in-place, prepending a specified string to each key
    that doesn't refer to a value that is list or dict.
    Parameters
    ----------
    d : dict
        Hierarchical dictionary to traverse and modify keys
    char : string, optional. Default='@'
        String to prepend onto each applicable dictionary key
    ignore_keys : iterable of str
        A set or list of strings, indicating keys not to prepend in the data structure
    """
    if isinstance(d, dict):
        for key in list(d.keys()):
            if key in ignore_keys:
                continue
            if isinstance(d[key], list) or isinstance(d[key], dict):
                METHOD_NAME(d[key], char=char, ignore_keys=ignore_keys)
            else:
                new_key = char + key
                d[new_key] = d[key]
                del d[key]
                METHOD_NAME(d[new_key], char=char, ignore_keys=ignore_keys)
    elif isinstance(d, list):
        for item in d:
            METHOD_NAME(item, char=char, ignore_keys=ignore_keys)