code: def get_index(handle: _nvmlDevice_t) -> int:
      _init_nvml()
      if _nvml_lib is None:
          return None
  
      c_index = c_uint()
      _nvml_check_error(
          _nvml_lib.nvmlDeviceGetIndex(handle, byref(c_index))
      )
      return c_index.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 19 for calling a global function with example usage: get_index(handle) and returns: c_index, None