code: def test_2_visible_devices(CVD):
      if nvml.device_get_count() < 2:
          pytest.skip("Less than two GPUs available")
  
      os.environ["CUDA_VISIBLE_DEVICES"] = CVD
      idx = int(CVD.split(",")[0])
  
      h = nvml._pynvml_handles()
      h2 = pynvml.nvmlDeviceGetHandleByIndex(idx)
  
      s = pynvml.nvmlDeviceGetSerial(h)
      s2 = pynvml.nvmlDeviceGetSerial(h2)
  
      assert s == s2
  
file_path: distributed/distributed/diagnostics/tests/test_nvml.py
imports: from __future__ import annotations
  import multiprocessing
  import os
  import pytest
  import dask
  from distributed.diagnostics import nvml
  from distributed.utils_test import gen_cluster
label_desc: Use image node_id 8 for calling a global function with example usage: test_2_visible_devices(CVD) without return types