code: def reset_nvml_state():
      try:
          pynvml.nvmlShutdown()
      except pynvml.NVMLError_Uninitialized:
          pass
      nvml.NVML_STATE = nvml.NVML_STATE.UNINITIALIZED
      nvml.NVML_OWNER_PID = None
  
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 1 for calling a global function with example usage: reset_nvml_state() without return types