class_docstr: Wrapper class for the basic Horovod API.
docstr: Returns the (previously registered) process set id corresponding to the MPI communicator comm. 
docstr_tok: ["Returns","the","(","previously","registered",")","process","set","id","corresponding","to","the","MPI","communicator","comm","."]
code: def _comm_process_set_id(self, comm: MPI.Comm) -> int:
      """Returns the (previously registered) process set id corresponding to the MPI communicator comm."""
      if not self.mpi_built():
          raise ValueError(
              "Horovod has not been built with MPI support. Ensure MPI is installed and "
              "reinstall Horovod with HOROVOD_WITH_MPI=1 to debug the build error."
          )
  
      from mpi4py import MPI
  
      if MPI._sizeof(MPI.Comm) == ctypes.sizeof(ctypes.c_int):
          MPI_Comm = ctypes.c_int
      else:
          MPI_Comm = ctypes.c_void_p
  
      self.MPI_LIB_CTYPES.horovod_comm_process_set.argtypes = [MPI_Comm]
      comm_obj = MPI_Comm.from_address(MPI._addressof(comm))
      result = int(
          self.MPI_LIB_CTYPES.horovod_comm_process_set(comm_obj)
      )
      if result == self.HOROVOD_PROCESS_SET_ERROR_INIT:
          raise ValueError(
              "Horovod has not been initialized or MPI has not been enabled; use hvd.init()."
          )
      elif result == self.HOROVOD_PROCESS_SET_ERROR_UNKNOWN_SET:
          raise ValueError(
              "MPI communicator does not correspond to any registered process set."
          )
      return result
  
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 29 for calling the HorovodBasics obj's underlying member method code with example usage: obj._comm_process_set_id(comm) and returns: result