code: def get_ndim(from_start, from_end, to_start, to_end):
      sizes = [
          len(a)
          for a in [from_start, from_end, to_start, to_end]
          if a is not None
      ]
      ndim = max(sizes) if len(sizes) > 0 else 1
      for sz in sizes:
          assert sz == ndim or sz == 1
      return ndim
  
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 17 for calling a global function with example usage: get_ndim(from_start, from_end, to_start, to_end) and returns: ndim