code: def test_new_axis():
      def data_gen():
          return [
              np.float32([[0, 1, 2], [3, 4, 5]]),
              np.float32([[0, 1], [2, 3], [4, 5]]),
          ]
  
      # fmt: off
      yield (_test_indexing, data_gen, "AB", "",
             lambda x: x[1:, dali.newaxis, :2],
             lambda x: x[1:, np.newaxis, :2])
      yield (_test_indexing, data_gen, "AB", "CAB",
             lambda x: x[dali.newaxis("C"), -1:, :-2],
             lambda x: x[np.newaxis, -1:, :-2])
      yield (_test_indexing, data_gen, "AB", "ACB",
             lambda x: x[:, dali.newaxis("C"), :],
             lambda x: x[:, np.newaxis, :])
      yield (_test_indexing, data_gen, "AB", "C",
             lambda x: x[1, dali.newaxis("C"), 1],
             lambda x: x[1, np.newaxis, 1])
  
imports: from nvidia import dali
  from nvidia.dali import fn
  import numpy
  from nvidia.dali.pipeline import Pipeline
  from nose_utils import assert_raises
label_desc: Use image node_id 10 for calling a global function with example usage: test_new_axis() and returns: list