Convert a nested dictionary from one convention to another.
    Args:
        d (dict): dictionary (nested or not) to be converted.
        convert_function (func): function that takes the string in one
        convention and returns it in the other one.
    Returns:
        Dictionary with the new keys.

def morph_dict(d, convert_function):
    """
    Convert a nested dictionary from one convention to another.
    Args:
        d (dict): dictionary (nested or not) to be converted.
        convert_function (func): function that takes the string in one
        convention and returns it in the other one.
    Returns:
        Dictionary with the new keys.
    """
    # Attribution: https://stackoverflow.com/a/33668421/633213
    new = {}
    for k, v in six.iteritems(d):
        new_v = v
        if isinstance(v, dict):
            new_v = morph_dict(v, convert_function)
        elif isinstance(v, list):
            new_v = list()
            for x in v:
                new_v.append(
                    morph_dict(x, convert_function)
                )
        new[convert_function(k)] = new_v
    return new