code: def has_package(package: str) -> bool:
      r"""Returns :obj:`True` in case :obj:`package` is installed."""
      if "|" in package:
          return any(has_package(p) for p in package.split("|"))
  
      req = Requirement(package)
      if find_spec(req.name) is None:
          return False
      module = import_module(req.name)
      if not hasattr(module, "__version__"):
          return True
  
      version = module.__version__
      # `req.specifier` does not support `.dev` suffixes, e.g., for
      # `pyg_lib==0.1.0.dev*`, so we manually drop them:
      if ".dev" in version:
          version = ".".join(version.split(".dev")[:-1])
  
      return version in req.specifier
  
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 11 for calling a global function with example usage: has_package(package) and returns: unknown, any, False, True