code: def from_string(host_string):
      hostname, slots = host_string.strip().split(":")
      return HostInfo(hostname, int(slots))
  
file_path: horovod/horovod/runner/common/util/hosts.py
imports: import collections
  import re
  from dataclasses import dataclass
label_desc: Use image node_id 2 for calling the HostInfo obj's underlying member method code with example usage: obj.from_string(host_string) and returns: HostInfo