class_docstr: Base class for implementing different placement strategies.
class_docstr_tok: ["Base","class","for","implementing","different","placement","strategies","."]
docstr: Returns list of one worker per node to use for NIC detection.
docstr_tok: ["Returns","list","of","one","worker","per","node","to","use","for","NIC","detection","."]
code: def get_node_workers(cls, workers):
      """Returns list of one worker per node to use for NIC detection."""
  
      # In some setups (i.e., Peloton), ray nodes may not have
      # unique host names.
      hostnames = map_blocking(lambda w: w.hostname.remote(), workers)
      host_worker_map = {}
      for hostname, worker in zip(hostnames, workers):
          host_worker_map[hostname] = worker
  
      return list(host_worker_map.values())
  
imports: from collections import defaultdict
  import logging
  from typing import Dict
  import ray
  from ray.util.placement_group import get_current_placement_group
  from horovod.ray.utils import map_blocking
  from horovod.ray.worker import BaseHorovodWorker
label_desc: Use image node_id 3 for calling the BaseStrategy obj's underlying member method code with example usage: obj.get_node_workers(cls, workers) and returns: list