

def _initialize_config_recursive(mapping):
    rv = []
    for (key, value) in tuple(mapping.items()):
        if isinstance(value, dict):
            rv.extend(_initialize_config_recursive(value))
            if ('__factory__' in value):
                mapping[key] = create_component(value)
                rv.append(mapping[key])
        elif isinstance(value, (list, tuple)):
            for (i, item) in enumerate(value):
                if isinstance(item, dict):
                    rv.extend(_initialize_config_recursive(item))
                    if ('__factory__' in item):
                        value[i] = create_component(item)
                        rv.append(value[i])
    return rv

dataset/ETHPy150Open ottogroup/palladium/palladium/util.py _initialize_config_recursive/original