code: def ensure_package_minimum_version(
      package_name: str, minimum_version: str, verbose=False
  ):
      """
      Raise error if module version is not compatible.
      """
      from packaging import version
  
      _is_available, _version = get_package_info(
          package_name, verbose=verbose
      )
      if _is_available:
          if _version == "unknown":
              logger.warning(
                  f"Could not determine version of {package_name}. Assuming version {minimum_version} is compatible."
              )
          else:
              if version.parse(_version) < version.parse(
                  minimum_version
              ):
                  raise ImportError(
                      f"Please upgrade {package_name} to version {minimum_version} or higher to use this module."
                  )
      yield
  
file_path: sahi/sahi/utils/import_utils.py
imports: import importlib.util
  import logging
  import os
label_desc: Use image node_id 6 for calling a global function with example usage: ensure_package_minimum_version(package_name, minimum_version, verbose) without return types