code: def _raw_device_uuid_nvml() -> Optional[List[str]]:
      """Return list of device UUID as reported by NVML or None if NVM discovery/initialization failed."""
      from ctypes import (
          CDLL,
          byref,
          c_int,
          c_void_p,
          create_string_buffer,
      )
  
      nvml_h = CDLL("libnvidia-ml.so.1")
      rc = nvml_h.nvmlInit()
      if rc != 0:
          warnings.warn("Can't initialize NVML")
          return None
      dev_count = c_int(-1)
      rc = nvml_h.nvmlDeviceGetCount_v2(byref(dev_count))
      if rc != 0:
          warnings.warn("Can't get nvml device count")
          return None
      uuids: List[str] = []
      for idx in range(dev_count.value):
          dev_id = c_void_p()
          rc = nvml_h.nvmlDeviceGetHandleByIndex_v2(idx, byref(dev_id))
          if rc != 0:
              warnings.warn("Can't get device handle")
              return None
          buf_len = 96
          buf = create_string_buffer(buf_len)
          rc = nvml_h.nvmlDeviceGetUUID(dev_id, buf, buf_len)
          if rc != 0:
              warnings.warn("Can't get device UUID")
              return None
          uuids.append(buf.raw.decode("ascii").strip("\0"))
      del nvml_h
      return uuids
  
imports: import os
  import warnings
  from contextlib import contextmanager
  from functools import lru_cache
  from typing import Generator, List, Optional, Union, cast
  import torch
  from typing_extensions import override
  from lightning.fabric.accelerators.accelerator import Accelerator
  from lightning.fabric.accelerators.registry import _AcceleratorRegistry
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_0
  from lightning.fabric.utilities.rank_zero import rank_zero_info
label_desc: Use image node_id 8 for calling a global function with example usage: _raw_device_uuid_nvml() and returns: uuids, None, None, None, None