code: def test_no_pynvml_package():
      with patch.dict("sys.modules", {"pynvml.smi": None}):
          with pytest.raises(
              ModuleNotFoundError,
              match="This contrib module requires pynvml to be installed.",
          ):
              GpuInfo()
  
file_path: ignite/tests/ignite/contrib/metrics/test_gpu_info.py
imports: from unittest.mock import Mock, patch
  import pytest
  import torch
  from ignite.contrib.metrics import GpuInfo
  from ignite.engine import Engine, State
label_desc: Use image node_id 1 for calling a global function with example usage: test_no_pynvml_package() without return types