code: def onlyXPU(func: Callable) -> Callable:
      r"""A decorator to skip tests if XPU is not found."""
      import pytest
  
      try:
          import intel_extension_for_pytorch as ipex
  
          xpu_available = ipex.xpu.is_available()
      except ImportError:
          xpu_available = False
      return pytest.mark.skipif(
          not xpu_available,
          reason="XPU not available",
      )(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 7 for calling a global function with example usage: onlyXPU(func) and returns: pytest