code: def _get_all_device_count() -> int:
      _init_nvml()
      if _nvml_lib is None:
          return None
  
      n_gpus = c_uint()
      _cu_check_error(_nvml_lib.nvmlDeviceGetCount(byref(n_gpus)))
      return n_gpus.value
  
imports: import dataclasses
  import logging
  import os
  import subprocess
  import sys
  import uuid
  from collections import namedtuple
  from ctypes import c_char, c_char_p, c_int, c_uint, c_ulonglong, byref, create_string_buffer, Structure, POINTER, CDLL
  from typing import List, Tuple, Optional, Union
  from ..utils import parse_readable_size
label_desc: Use image node_id 10 for calling a global function with example usage: _get_all_device_count() and returns: n_gpus, None