code: def create_run_command(
      host_slot_counts: List[int],
      ip_addresses: List[str],
      inter_node_network_interface: Optional[str],
      optimizations: Dict[str, Any],
      debug: bool,
      optional_args: List[str],
  ) -> List[str]:
      num_machines = len(ip_addresses)
      num_proc_total = sum(host_slot_counts)
  
      # Construct the horovodrun command.
      horovod_process_cmd = [
          "horovodrun",
          "-np",
          str(num_proc_total),
          "-p",
          str(constants.DTRAIN_SSH_PORT),
          "-H",
          create_hostlist_arg(host_slot_counts, ip_addresses),
          "--start-timeout",
          str(constants.HOROVOD_STARTUP_TIMEOUT_SECONDS),
          "--gloo-timeout-seconds",
          str(constants.HOROVOD_GLOO_TIMEOUT_SECONDS),
      ]
      if inter_node_network_interface is not None and num_machines > 1:
          horovod_process_cmd.extend(
              ["--network-interface", inter_node_network_interface]
          )
      horovod_process_cmd.extend(create_performance_args(optimizations))
      if debug:
          horovod_process_cmd.append("--verbose")
      horovod_process_cmd.extend(optional_args)
      horovod_process_cmd.append("--")
      return horovod_process_cmd
  
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 3 for calling a global function with example usage: create_run_command(host_slot_counts, ip_addresses, inter_node_network_interface, optimizations, debug, optional_args) and returns: horovod_process_cmd