def METHOD_NAME(cfg):
    layers = cfg["layers"]
    expand = [layer for layer in layers if "layers" in layers[layer]]
    for layer in expand:
        for i, (name, num) in enumerate(
            zip(layers[layer]["names"], layers[layer]["layers"])
        ):
            new_layer = copy.deepcopy(layers[layer])
            del new_layer["names"]
            new_layer["name"] = name
            del new_layer["layers"]
            new_layer["layer"] = num
            layers[name] = new_layer
        del layers[layer]