def normalize(value, dict_type=dict):
    if isinstance(value, dict):
        normalized = dict_type()
        for k, v in value.iteritems():
            if isinstance(k, basestring):
                k = k.strip().lower().replace(' ', '_')
            normalized[k] = normalize(v, dict_type)
        return normalized
    elif isinstance(value, list):
        return [normalize(v, dict_type) for v in value]
    elif isinstance(value, tuple):
        return tuple([normalize(v, dict_type) for v in value])
    else:
        return value
Normalize values. Recursively normalizes dict keys to be lower case,
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/utils/misc.py/normalize