code: def _installed_packages():
      try:
          import pkg_resources
  
          return pkg_resources.working_set
      except ImportError:
          print(
              "Module pkg_resources from setuptools is not installed",
              file=sys.stderr,
          )
  
      try:
          import pip
  
          pip_maj_version = int(pip.__version__.split(".", 1)[0])
          if pip_maj_version >= 10:
              from pip._internal.utils.misc import (
                  get_installed_distributions,
              )
          else:
              from pip import get_installed_distributions
          return get_installed_distributions(skip=(), local_only=False)
      except ImportError:
          print("Module pip is not installed", file=sys.stderr)
          sys.exit(2)
  
file_path: h2o-3/h2o-py/scripts/verify_requirements.py
imports: import argparse
  import os
  import re
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: _installed_packages() and returns: pkg_resources, get_installed_distributions