code: def objects2boxes(objects, input_shape):
      if len(objects) == 0:
          return np.int32([[0] * len(input_shape) + list(input_shape)])
  
      return np.int32(
          [
              [s.start for s in obj] + [s.stop for s in obj]
              for obj in objects
          ]
      )
  
imports: from nose_utils import assert_raises
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.ops
  import numpy
  import scipy.ndimage
  import scipy.ndimage.measurements
  import random
  from test_utils import check_batch, np_type_to_dali
  from nose.tools import nottest
  from nose.plugins.attrib import attr
label_desc: Use image node_id 5 for calling a global function with example usage: objects2boxes(objects, input_shape) and returns: np, np