code: def check_transform_crop_op(
      from_start=None,
      from_end=None,
      to_start=None,
      to_end=None,
      absolute=False,
      has_input=False,
      reverse_order=False,
      batch_size=1,
      num_threads=4,
      device_id=0,
  ):
      ndim = get_ndim(from_start, from_end, to_start, to_end)
      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.crop(
                  T0,
                  device="cpu",
                  from_start=from_start,
                  from_end=from_end,
                  to_start=to_start,
                  to_end=to_end,
                  absolute=absolute,
                  reverse_order=reverse_order,
              )
              pipe.set_outputs(T1, T0)
          else:
              T1 = fn.transforms.crop(
                  device="cpu",
                  from_start=from_start,
                  from_end=from_end,
                  to_start=to_start,
                  to_end=to_end,
                  absolute=absolute,
              )
              pipe.set_outputs(T1)
      pipe.build()
      outs = pipe.run()
  
      ref_mat = crop_affine_mat(
          from_start, from_end, to_start, to_end, absolute=absolute
      )
      T0 = outs[1] if has_input else None
      T1 = outs[0]
      check_results(
          T1, batch_size, ref_mat, T0, reverse_order, atol=1e-6
      )
      if not has_input:
          from_start, from_end, to_start, to_end = expand_dims(
              from_start, from_end, to_start, to_end
          )
          if absolute:
              from_start, from_end = np.minimum(
                  from_start, from_end
              ), np.maximum(from_start, from_end)
              to_start, to_end = np.minimum(
                  to_start, to_end
              ), np.maximum(to_start, to_end)
          for idx in range(batch_size):
              MT = T1.at(idx)
              M, T = MT[:ndim, :ndim], MT[:, ndim]
              assert np.allclose(
                  np.dot(M, from_start) + T, to_start, atol=1e-6
              )
              assert np.allclose(
                  np.dot(M, from_end) + T, to_end, 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 20 for calling a global function with example usage: check_transform_crop_op(from_start, from_end, to_start, to_end, absolute, has_input, reverse_order, batch_size, num_threads, device_id) without return types