code: def mock_gpu_is_available():
      with patch(
          "ignite.contrib.metrics.gpu_info.torch.cuda"
      ) as mock_cuda:
          mock_cuda.is_available.return_value = True
          yield mock_cuda
  
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 6 for calling a global function with example usage: mock_gpu_is_available() without return types