code: def _require_version(lib, what, version="0.0"):
      """Require library for a purpose."""
      ok, got = check_version(lib, version, return_version=True)
      if not ok:
          extra = f" (version >= {version})" if version != "0.0" else ""
          why = (
              "package was not found"
              if got is None
              else f"got {repr(got)}"
          )
          raise ImportError(
              f"The {lib} package{extra} is required to {what}, "
              f"{why}"
          )
  
imports: import numbers
  import operator
  import os
  import re
  from builtins import input
  from difflib import get_close_matches
  from importlib import import_module
  from pathlib import Path
  import numpy
  from ..defaults import HEAD_SIZE_DEFAULT, _handle_default
  from ..fixes import _compare_version, _median_complex
  from ._logging import _record_warnings, _verbose_safe_false, logger, verbose, warn
label_desc: Use image node_id 6 for calling a global function with example usage: _require_version(lib, what, version) without return types