code: def check_transform_shear_op(
      shear=None,
      angles=None,
      center=None,
      has_input=False,
      reverse_order=False,
      batch_size=1,
      num_threads=4,
      device_id=0,
  ):
      assert shear is not None or angles is not None
      if shear is not None:
          assert len(shear) == 2 or len(shear) == 6
          ndim = 3 if len(shear) == 6 else 2
      else:
          assert len(angles) == 2 or len(angles) == 6
          ndim = 3 if len(angles) == 6 else 2
      assert center is None or len(center) == ndim
  
      pipe = Pipeline(
          batch_size=batch_size,
          num_threads=num_threads,
          device_id=device_id,
          seed=1234,
      )
      with pipe:
          if has_input:
              T0 = fn.random.uniform(
                  range=(-1, 1), shape=(ndim, ndim + 1)
              )
              T1 = fn.transforms.shear(
                  T0,
                  device="cpu",
                  shear=shear,
                  angles=angles,
                  center=center,
                  reverse_order=reverse_order,
              )
              pipe.set_outputs(T1, T0)
          else:
              T1 = fn.transforms.shear(
                  device="cpu",
                  shear=shear,
                  angles=angles,
                  center=center,
              )
              pipe.set_outputs(T1)
      pipe.build()
      outs = pipe.run()
      ref_mat = shear_affine_mat(
          shear=shear, angles=angles, center=center
      )
      T0 = outs[1] if has_input else None
      check_results(
          outs[0], batch_size, ref_mat, T0, 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 13 for calling a global function with example usage: check_transform_shear_op(shear, angles, center, has_input, reverse_order, batch_size, num_threads, device_id) without return types