def METHOD_NAME(namespace_nests, local_envs):
    for k, v in local_envs.items():
        if isinstance(v, dict):
            nests = copy.deepcopy(namespace_nests)
            nests.append(k)
            METHOD_NAME(nests, v)
        elif (k == "dataset" or k == "phase" or
              k == "runner") and isinstance(v, list):
            for i in v:
                if i.get("name") is None:
                    raise ValueError("name must be in dataset list. ", v)
                nests = copy.deepcopy(namespace_nests)
                nests.append(k)
                nests.append(i["name"])
                METHOD_NAME(nests, i)
        else:
            global_k = ".".join(namespace_nests + [k])
            all_flattens[global_k] = v