code: def check_transform_shear_op_runtime_args(
      ndim,
      use_angles,
      use_center,
      has_input=False,
      reverse_order=False,
      batch_size=1,
      num_threads=4,
      device_id=0,
  ):
      pipe = Pipeline(
          batch_size=batch_size,
          num_threads=num_threads,
          device_id=device_id,
          seed=1234,
      )
      with pipe:
          inputs = (
              [fn.random.uniform(range=(-1, 1), shape=(ndim, ndim + 1))]
              if has_input
              else []
          )
          params = []
          angles_arg = None
          shear_arg = None
          center_arg = None
          if use_angles:
              angles_arg = fn.random.uniform(
                  range=(-80, 80), shape=[ndim, ndim - 1]
              )
              params.append(angles_arg)
          else:
              shear_arg = fn.random.uniform(
                  range=(-2, 2), shape=[ndim, ndim - 1]
              )
              params.append(shear_arg)
          if use_center:
              center_arg = fn.random.uniform(
                  range=(-10, 10), shape=[ndim]
              )
              params.append(center_arg)
  
          T1 = fn.transforms.shear(
              *inputs,
              device="cpu",
              shear=shear_arg,
              angles=angles_arg,
              center=center_arg,
              reverse_order=reverse_order,
          )
          pipe.set_outputs(T1, *inputs, *params)
      pipe.build()
      for _ in range(3):
          outs = pipe.run()
          T0 = outs[1] if has_input else None
          shear_param = outs[2 if has_input else 1]
          center_param = (
              outs[3 if has_input else 2] if use_center else None
          )
          for idx in range(batch_size):
              angles = None
              shear = None
              center = None
              if use_angles:
                  angles = shear_param.at(idx)
              else:
                  shear = shear_param.at(idx)
              if use_center:
                  center = center_param.at(idx)
              ref_mat = shear_affine_mat(
                  shear=shear, angles=angles, center=center
              )
              inp = T0.at(idx) if T0 is not None else None
              check_results_sample(
                  outs[0].at(idx),
                  ref_mat,
                  inp,
                  reverse_order,
                  atol=1e-6,
              )
  
imports: import random
  import warnings
  import numpy
  from scipy.spatial.transform import Rotation
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops.transforms
  import nvidia.dali.ops
  import nvidia.dali.fn
  from nvidia.dali import pipeline_def
  from sequences_test_utils import ArgData, ArgDesc, sequence_suite_helper, ArgCb, ParamsProvider
  from nose_utils import assert_raises
label_desc: Use image node_id 14 for calling a global function with example usage: check_transform_shear_op_runtime_args(ndim, use_angles, use_center, has_input, reverse_order, batch_size, num_threads, device_id) without return types