code: def check_version(
      min_version: str,
      warning_only: bool = False,
      library: Optional[ModuleType] = None,
  ):
      """Check the version of gluonnlp satisfies the provided minimum version.
      An exception is thrown if the check does not pass.
  
      Parameters
      ----------
      min_version
          Minimum version
      warning_only
          Printing a warning instead of throwing an exception.
      library
          The target library for version check. Checks gluonnlp by default
      """
      # pylint: disable=import-outside-toplevel
      from .. import __version__
  
      if library is None:
          version = __version__
          name = "GluonNLP"
      else:
          version = library.__version__
          name = library.__name__
      from packaging.version import parse
  
      bad_version = parse(version.replace(".dev", "")) < parse(
          min_version
      )
      if bad_version:
          msg = (
              "Installed {} version {} does not satisfy the "
              "minimum required version {}".format(
                  name, version, min_version
              )
          )
          if warning_only:
              warnings.warn(msg)
          else:
              raise AssertionError(msg)
  
imports: import argparse
  import os
  import sys
  import inspect
  import logging
  import warnings
  import functools
  import uuid
  from types import ModuleType
  from typing import Optional
  import numpy
  import hashlib
  import requests
  import itertools
  import random
  from .lazy_imports import try_import_boto3
  from mxnet.gluon.utils import replace_file
  import glob
label_desc: Use image node_id 15 for calling a global function with example usage: check_version(min_version, warning_only, library) without return types