code: def check_package_status(package, min_version):
      """
      Returns a dictionary containing a boolean specifying whether given package
      is up-to-date, along with the version string (empty string if
      not installed).
      """
      package_status = {}
      try:
          module = importlib.import_module(package)
          package_version = module.__version__
          package_status["up_to_date"] = parse_version(
              package_version
          ) >= parse_version(min_version)
          package_status["version"] = package_version
      except ImportError:
          traceback.print_exc()
          package_status["up_to_date"] = False
          package_status["version"] = ""
  
      req_str = "scikit-learn requires {} >= {}.\n".format(
          package, min_version
      )
  
      instructions = (
          "Installation instructions are available on the "
          "scikit-learn website: "
          "https://scikit-learn.org/stable/install.html\n"
      )
  
      if package_status["up_to_date"] is False:
          if package_status["version"]:
              raise ImportError(
                  "Your installation of {} {} is out-of-date.\n{}{}".format(
                      package,
                      package_status["version"],
                      req_str,
                      instructions,
                  )
              )
          else:
              raise ImportError(
                  "{} is not installed.\n{}{}".format(
                      package, req_str, instructions
                  )
              )
  
imports: import importlib
  import os
  import platform
  import shutil
  import sys
  import traceback
  from os.path import join
  from setuptools import Command, Extension, setup
  from setuptools.command.build_ext import build_ext
  import sklearn
  import sklearn._min_dependencies
  from sklearn._build_utils import _check_cython_version
  from sklearn.externals._packaging.version import parse
label_desc: Use image node_id 1 for calling a global function with example usage: check_package_status(package, min_version) without return types