code: def test_jitter_unit(jitter_method, float_type, ctx) -> None:
      # TODO: Enable GPU tests on Jenkins
      if ctx == "gpu" and not check_gpu_support():
          return
  
      with mx.Context(ctx):
          matrix = nd.array(
              [[[1, 2], [3, 4]], [[10, 100], [-21.5, 41]]],
              dtype=float_type,
          )
          F = mx.nd
          num_data_points = matrix.shape[1]
          if jitter_method == "eig":
              L = jitter_cholesky_eig(
                  F, matrix, num_data_points, float_type
              )
          elif jitter_method == "iter":
              L = jitter_cholesky(
                  F, matrix, num_data_points, float_type
              )
  
      assert (
          np.sum(np.isnan(L.asnumpy())) == 0
      ), "NaNs in Cholesky factor!"
  
file_path: gluonts/test/mx/test_jitter.py
imports: import math
  import sys
  import mxnet
  import mxnet.ndarray
  import numpy
  import pytest
  from gluonts.mx.model.gp_forecaster.gaussian_process import GaussianProcess
  from gluonts.mx.context import check_gpu_support
  from gluonts.mx.kernels import RBFKernel
  from gluonts.mx.linalg_util import jitter_cholesky, jitter_cholesky_eig
label_desc: Use image node_id 1 for calling a global function with example usage: test_jitter_unit(jitter_method, float_type, ctx) without return types