code: def withCUDA(func: Callable) -> Callable:
      r"""A decorator to test both on CPU and CUDA (if available)."""
      import pytest
  
      devices = [pytest.param(torch.device("cpu"), id="cpu")]
      if torch.cuda.is_available():
          devices.append(
              pytest.param(torch.device("cuda:0"), id="cuda:0")
          )
  
      # Additional devices can be registered through environment variables:
      device = os.getenv("TORCH_DEVICE")
      if device:
          backend = os.getenv("TORCH_BACKEND")
          if backend is None:
              warnings.warn(
                  f"Please specify the backend via 'TORCH_BACKEND' in"
                  f"order to test against '{device}'"
              )
          else:
              import_module(backend)
              devices.append(
                  pytest.param(torch.device(device), id=device)
              )
  
      return pytest.mark.parametrize("device", devices)(func)
  
imports: import os
  import sys
  import warnings
  from importlib import import_module
  from importlib.util import find_spec
  from typing import Callable
  import torch
  from packaging.requirements import Requirement
  from torch_geometric.typing import WITH_PYG_LIB, WITH_TORCH_SPARSE
  from torch_geometric.visualization.graph import has_graphviz
label_desc: Use image node_id 13 for calling a global function with example usage: withCUDA(func) and returns: pytest