code: def test_transform_crop_op(batch_size=3, num_threads=4, device_id=0):
      for from_start, from_end, to_start, to_end in [
          (None, None, None, None),
          ((0.1, 0.2), (1.0, 1.2), (0.3, 0.2), (0.5, 0.6)),
          ((0.1, 0.2), (0.4, 0.9), None, None),
          ((0.2, 0.2), None, None, None),
          (None, (0.4, 0.9), None, None),
          (
              (0.1, 0.2, 0.3),
              (1.0, 1.2, 1.3),
              (0.3, 0.2, 0.1),
              (0.5, 0.6, 0.7),
          ),
          ((0.1, 0.2, 0.3), (1.0, 1.2, 1.3), None, None),
      ]:
          for has_input in [False, True]:
              for reverse_order in (
                  [False, True] if has_input else [False]
              ):
                  yield (
                      check_transform_crop_op,
                      from_start,
                      from_end,
                      to_start,
                      to_end,
                      False,
                      has_input,
                      reverse_order,
                      batch_size,
                      num_threads,
                      device_id,
                  )
                  # Reversed start and end
                  for absolute in [False, True]:
                      yield (
                          check_transform_crop_op,
                          from_end,
                          from_start,
                          to_end,
                          to_start,
                          absolute,
                          has_input,
                          reverse_order,
                          batch_size,
                          num_threads,
                          device_id,
                      )
  
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 21 for calling a global function with example usage: test_transform_crop_op(batch_size, num_threads, device_id) without return types