def METHOD_NAME(env, name_prefix):
    profile_names = {p["name"] for p in env["profiles"]}
    env["name"] = name_prefix + env["name"]
    for profile in env["profiles"]:
        profile["name"] = name_prefix + profile["name"]
        for worker in profile["workers"]:
            _prefix_worker(worker, profile_names, name_prefix)
    for worker in env["workers"]:
        _prefix_worker(worker, profile_names, name_prefix)