code: def check_random_bbox_crop_variable_shape(
      batch_size,
      ndim,
      scaling,
      aspect_ratio,
      use_labels,
      output_bbox_indices,
  ):
      bbox_source = BBoxDataIterator(
          100, batch_size, ndim, produce_labels=use_labels
      )
      bbox_layout = "xyzXYZ" if ndim == 3 else "xyXY"
      pipe = RandomBBoxCropSynthDataPipeline(
          device="cpu",
          batch_size=batch_size,
          bbox_source=bbox_source,
          bbox_layout=bbox_layout,
          scaling=scaling,
          aspect_ratio=aspect_ratio,
          input_shape=None,
          crop_shape=None,
          output_bbox_indices=output_bbox_indices,
      )
      pipe.build()
      for i in range(100):
          outputs = pipe.run()
          for sample in range(batch_size):
              in_boxes = outputs[0].at(sample)
              out_crop_anchor = outputs[1].at(sample)
              out_crop_shape = outputs[2].at(sample)
              out_boxes = outputs[3].at(sample)
              check_crop_dims_variable_size(
                  out_crop_anchor, out_crop_shape, scaling, aspect_ratio
              )
              bbox_indices_out_idx = 4 if not use_labels else 5
              bbox_indices = (
                  outputs[bbox_indices_out_idx].at(sample)
                  if output_bbox_indices
                  else None
              )
              check_processed_bboxes(
                  out_crop_anchor,
                  out_crop_shape,
                  in_boxes,
                  out_boxes,
                  bbox_indices,
              )
  
imports: from nvidia.dali.pipeline import Pipeline
  from nvidia.dali import pipeline_def
  import nvidia.dali.ops
  import nvidia.dali.fn
  import nvidia.dali.types
  import numpy
  import random
label_desc: Use image node_id 7 for calling a global function with example usage: check_random_bbox_crop_variable_shape(batch_size, ndim, scaling, aspect_ratio, use_labels, output_bbox_indices) without return types