code: def mock_gpu_is_not_available():
      from unittest.mock import patch
  
      with patch("torch.cuda") as mock_cuda:
          mock_cuda.is_available.return_value = False
          yield mock_cuda
  
imports: import functools
  import os
  import shutil
  import sys
  import tempfile
  import time
  from pathlib import Path
  import pytest
  import torch
  import torch.distributed
  import ignite.distributed
label_desc: Use image node_id 22 for calling a global function with example usage: mock_gpu_is_not_available() without return types