code: def create_hostlist_arg(
      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
              )
          ]
      )
  
file_path: determined/harness/determined/horovod.py
imports: import importlib
  import os
  from typing import Any, Dict, List, Optional
  from determined import constants
  from determined.common import check
label_desc: Use image node_id 1 for calling a global function with example usage: create_hostlist_arg(host_slot_counts, ip_addresses) and returns: str