code: def is_package_installed(libname):
      """Check whether a python package is installed."""
      import importlib
  
      try:
          importlib.import_module(libname)
          return True
      except ImportError:
          return False
  
file_path: openTSNE/openTSNE/utils.py
imports: from functools import wraps
  from time import time
  import warnings
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: is_package_installed(libname) and returns: True, False