code: def parse_hosts(hosts_string):
      """Parse a string of comma-separated hostname:slots mappings into a list of HostItem objects.
  
      :param hosts_string: list of addresses and number of processes on each host.
          For example:
              - 'worker-0:2,worker-1:2'
              - '10.11.11.11:4,10.11.11.12:4'
      :return: a list of HostInfo objects describing host to slot mappings
      :rtype: list[HostInfo]
      """
      return [
          HostInfo.from_string(host_string)
          for host_string in hosts_string.split(",")
      ]
  
file_path: horovod/horovod/runner/common/util/hosts.py
imports: import collections
  import re
  from dataclasses import dataclass
label_desc: Use image node_id 3 for calling a global function with example usage: parse_hosts(hosts_string) and returns: unknown