code: def check_with_uniform(
      uf,
      arg_shapes,
      dim=None,
      npuf=None,
      rmin=-10,
      type_list=[np.float32],
  ):
      """check function consistency with uniform random numbers"""
      if isinstance(arg_shapes, int):
          assert dim
          shape = tuple(
              np.random.randint(1, int(1000 ** (1.0 / dim)), size=dim)
          )
          arg_shapes = [shape] * arg_shapes
      for dtype in type_list:
          ndarray_arg = []
          numpy_arg = []
          for s in arg_shapes:
              npy = np.random.uniform(rmin, 10, s).astype(dtype)
              narr = mx.nd.array(npy, dtype=dtype)
              ndarray_arg.append(narr)
              numpy_arg.append(npy)
          out1 = uf(*ndarray_arg)
          if npuf is None:
              out2 = uf(*numpy_arg).astype(dtype)
          else:
              out2 = npuf(*numpy_arg).astype(dtype)
  
          assert out1.shape == out2.shape
          if isinstance(out1, mx.nd.NDArray):
              out1 = out1.asnumpy()
          if dtype == np.float16:
              assert reldiff(out1, out2) < 2e-3
          else:
              assert reldiff(out1, out2) < 1e-6
  
imports: import os
  import mxnet
  import numpy
  import pickle
label_desc: Use image node_id 4 for calling a global function with example usage: check_with_uniform(uf, arg_shapes, dim, npuf, rmin, type_list) without return types