code: def num_devices(self):
          
          c_count = c_uint()
          _check_return(_NVML.get_function(
              "nvmlDeviceGetCount_v2")(byref(c_count)))
          return c_count.value
docs: Get number of devices