code: def _assert_raise_cuxx_version_not_satisfied(min_version, cfg):
      def less_than(version_left, version_right):
          """Compares two version strings in the format num(.[num])*"""
          if not version_left or not version_right:
              return False
  
          left = version_left.split(".")
          right = version_right.split(".")
  
          # 0 pad shortest version - e.g.
          # less_than("9.1", "9.1.9") == less_than("9.1.0", "9.1.9")
          longest = max(len(left), len(right))
          left.extend([0] * (longest - len(left)))
          right.extend([0] * (longest - len(right)))
  
          # compare each of the version components
          for l, r in zip(left, right):
              if l == r:
                  continue
              return int(l) < int(r)
          return False
  
      def test_helper(orig_test):
          @functools.wraps(orig_test)
          def test_new(*args, **kwargs):
              cuxx_off = os.getenv(cfg["TEST_OFF_ENV_VAR"]) == "true"
              cuxx_env_version = os.getenv(
                  cfg["VERSION_ENV_VAR"],
                  None if cuxx_off else cfg["DEFAULT_VERSION"],
              )
              cuxx_test_disabled = cuxx_off or less_than(
                  cuxx_env_version, min_version
              )
              if (
                  not cuxx_test_disabled
                  or mx.device.current_device().device_type == "cpu"
              ):
                  orig_test(*args, **kwargs)
              else:
                  pytest.raises(
                      (MXNetError, RuntimeError),
                      orig_test,
                      *args,
                      **kwargs,
                  )
  
          return test_new
  
      return test_helper
  
imports: import sys, os, logging, functools
  import multiprocessing
  import mxnet
  import numpy
  import random
  import shutil
  from mxnet.base import MXNetError
  from mxnet.test_utils import environment
  import models
  from contextlib import contextmanager
  import pytest
  from mxnet.util import TemporaryDirectory
  import locale
label_desc: Use image node_id 4 for calling a global function with example usage: _assert_raise_cuxx_version_not_satisfied(min_version, cfg) and returns: test_helper, False, test_new, False, unknown