code: def withPackage(*args: str) -> Callable:
      r"""A decorator to skip tests if certain packages are not installed.
      Also supports version specification.
      """
      na_packages = set(
          package for package in args if not has_package(package)
      )
  
      if len(na_packages) == 1:
          reason = f"Package {list(na_packages)[0]} not found"
      else:
          reason = f"Packages {na_packages} not found"
  
      def decorator(func: Callable) -> Callable:
          import pytest
  
          return pytest.mark.skipif(
              len(na_packages) > 0, reason=reason
          )(func)
  
      return decorator
  
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 12 for calling a global function with example usage: withPackage() and returns: decorator, pytest