code: def _testimpl_expand_dims(
      axes,
      new_axis_names,
      layout,
      shapes,
      expected_out_shapes,
      expected_layout,
  ):
      batch_size = len(shapes)
      pipe = expand_dims_pipe(
          batch_size=batch_size,
          num_threads=1,
          device_id=0,
          shapes=shapes,
          axes=axes,
          new_axis_names=new_axis_names,
          layout=layout,
      )
      pipe.build()
      for _ in range(3):
          outs = pipe.run()
          assert outs[0].layout() == expected_layout
          for i in range(batch_size):
              out_arr = np.array(outs[0][i])
              assert out_arr.shape == expected_out_shapes[i]
  
file_path: DALI/dali/test/python/operator_1/test_expand_dims.py
imports: from nvidia.dali import pipeline_def
  import nvidia.dali.fn
  import numpy
  from nose_utils import assert_raises
label_desc: Use image node_id 3 for calling a global function with example usage: _testimpl_expand_dims(axes, new_axis_names, layout, shapes, expected_out_shapes, expected_layout) without return types