class_docstr: Packs workers together but does not guarantee balanced hosts.
  
  Will use the current placement group if one is available.
class_docstr_tok: ["Packs","workers","together","but","does","not","guarantee","balanced","hosts",".","Will","use","the","current","placement","group","if","one","is","available","."]
code: def num_workers(self) -> int:
      return int(self._num_workers)
  
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 2 for calling the PGStrategy obj's underlying member method code with example usage: obj.num_workers() and returns: int