code: def check_version(
      library, min_version="0.0", *, strip=True, return_version=False
  ):
      r"""Check minimum library version required.
  
      Parameters
      ----------
      library : str
          The library name to import. Must have a ``__version__`` property.
      min_version : str
          The minimum version string. Anything that matches
          ``'(\d+ | [a-z]+ | \.)'``. Can also be empty to skip version
          check (just check for library presence).
      strip : bool
          If True (default), then PEP440 development markers like ``.devN``
          will be stripped from the version. This makes it so that
          ``check_version('mne', '1.1')`` will be ``True`` even when on version
          ``'1.1.dev0'`` (prerelease/dev version). This option is provided for
          backward compatibility with the behavior of ``LooseVersion``, and
          diverges from how modern parsing in ``packaging.version.parse`` works.
  
          .. versionadded:: 1.0
      return_version : bool
          If True (default False), also return the version (can be None if the
          library is missing).
  
          .. versionadded:: 1.0
  
      Returns
      -------
      ok : bool
          True if the library exists with at least the specified version.
      version : str | None
          The version. Only returned when ``return_version=True``.
      """
      ok = True
      version = None
      try:
          library = import_module(library)
      except ImportError:
          ok = False
      else:
          check_version = min_version and min_version != "0.0"
          get_version = check_version or return_version
          if get_version:
              version = library.__version__
              if strip:
                  version = _strip_dev(version)
          if check_version:
              if _compare_version(version, "<", min_version):
                  ok = False
      out = (ok, version) if return_version else ok
      return out
  
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 4 for calling a global function with example usage: check_version(library, min_version) and returns: out