code: def onlyOnline(func: Callable) -> Callable:
      r"""A decorator to skip tests if there exists no connection to the
      internet.
      """
      import http.client as httplib
  
      import pytest
  
      has_connection = True
      connection = httplib.HTTPSConnection("8.8.8.8", timeout=5)
      try:
          connection.request("HEAD", "/")
      except Exception:
          has_connection = False
      finally:
          connection.close()
  
      return pytest.mark.skipif(
          not has_connection,
          reason="No internet connection",
      )(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 8 for calling a global function with example usage: onlyOnline(func) and returns: pytest