class_docstr: Wrapper class for the basic Horovod API.
docstr: Returns a dictionary { process_set_id: list of process set ranks }, for internal use.
  
  Note that this function does not lock the Horovod-internal ProcessSetTable. If the Horovod background thread
  shuts down while the Python thread is still executing this function, there can be spurious failures. 
docstr_tok: ["Returns","a","dictionary","{","process_set_id",":","list","of","process","set","ranks","}",",","for","internal","use",".","Note","that","this","function","does","not","lock","the","Horovod-internal","ProcessSetTable",".","If","the","Horovod","background","thread","shuts","down","while","the","Python","thread","is","still","executing","this","function",",","there","can","be","spurious","failures","."]
code: def _get_process_set_ids_and_ranks(self) -> Dict[int, List[int]]:
      """Returns a dictionary { process_set_id: list of process set ranks }, for internal use.
  
      Note that this function does not lock the Horovod-internal ProcessSetTable. If the Horovod background thread
      shuts down while the Python thread is still executing this function, there can be spurious failures.
      """
      num = int(self.MPI_LIB_CTYPES.horovod_number_of_process_sets())
      ids_array = (ctypes.c_int * num)()
      self.MPI_LIB_CTYPES.horovod_process_set_ids(ids_array)
      ret = {}
      for ps_id in ids_array:
          ps_size = int(
              self.MPI_LIB_CTYPES.horovod_process_set_size(
                  ctypes.c_int(ps_id)
              )
          )
  
          if ps_size == self.HOROVOD_PROCESS_SET_ERROR_INIT:
              raise ValueError(
                  "Horovod has not been initialized properly; use hvd.init()."
              )
          elif ps_size < 0:
              raise RuntimeError(
                  "Process set table was modified outside of _get_process_set_ids_and_ranks()"
              )
  
          ranks_array = (ctypes.c_int * ps_size)()
          res = int(
              self.MPI_LIB_CTYPES.horovod_process_set_ranks(
                  ctypes.c_int(ps_id), ranks_array
              )
          )
          if res == self.HOROVOD_PROCESS_SET_ERROR_INIT:
              raise ValueError(
                  "Horovod has not been initialized properly; use hvd.init()."
              )
          elif res < 0:
              raise RuntimeError(
                  "Process set table was modified outside of _get_process_set_ids_and_ranks()"
              )
          ret[ps_id] = list(ranks_array)
      return ret
  
imports: import atexit
  import ctypes
  import os
  from typing import *
  from horovod.common.process_sets import ProcessSet, global_process_set, _init_process_sets
  from horovod.common import util
label_desc: Use image node_id 28 for calling the HorovodBasics obj's underlying member method code with example usage: obj._get_process_set_ids_and_ranks() and returns: ret