code: def num_gpus():
      """Query CUDA for the number of GPUs present.
  
      Raises
      ------
      Will raise an exception on any CUDA error.
  
      Returns
      -------
      count : int
          The number of GPUs.
  
      """
      count = ctypes.c_int()
      check_call(_LIB.MXGetGPUCount(ctypes.byref(count)))
      return count.value
  
file_path: mxnet/python/mxnet/device.py
imports: import contextvars
  import ctypes
  from .base import _LIB
  from .base import check_call
label_desc: Use image node_id 4 for calling a global function with example usage: num_gpus() and returns: count