def METHOD_NAME(host_slot_counts: List[int], ip_addresses: List[str]) -> str:
    assert len(host_slot_counts) == len(ip_addresses), "don't know slots for each node"
    trial_runner_hosts = ip_addresses.copy()
    # Horovodrun does not interpret "0.0.0.0" correctly.
    trial_runner_hosts[0] = "localhost"
    return ",".join(
        [f"{host}:{slots}" for host, slots in zip(trial_runner_hosts, host_slot_counts)]
    )