code: def test_utils_set_gpu_mode():
      """Test setting gpu mode to False to force CPU."""
      if torch.cuda.is_available():
          set_gpu_mode(mode=True)
          assert global_device() == torch.device("cuda:0")
          assert tu._USE_GPU
      else:
          set_gpu_mode(mode=False)
          assert global_device() == torch.device("cpu")
          assert not tu._USE_GPU
      assert not tu._GPU_ID
  
imports: import collections
  import numpy
  import pytest
  import torch
  from torch import tensor
  import torch.nn.functional
  from garage.envs import GymEnv, normalize
  from garage.experiment.deterministic import set_seed
  from garage.torch import as_torch_dict, compute_advantages, flatten_to_single_vector, global_device, pad_to_last, product_of_gaussians, set_gpu_mode, state_dict_to, torch_to_np
  import garage.torch._functions
  from garage.torch.policies import DeterministicMLPPolicy
  from tests.fixtures import TfGraphTestCase
label_desc: Use image node_id 2 for calling a global function with example usage: test_utils_set_gpu_mode() without return types