code: def test_numba_plugin():
      import nvidia.dali.plugin.numba as dali_numba
  
      check_numba_compatibility_cpu()
  
      def double_sample(out_sample, in_sample):
          out_sample[:] = 2 * in_sample[:]
  
      @pipeline_def(batch_size=2, device_id=0, num_threads=4)
      def numba_pipe():
          forty_two = fn.external_source(
              source=lambda x: np.full((2,), 42, dtype=np.uint8),
              batch=False,
          )
          out = dali_numba.fn.experimental.numba_function(
              forty_two,
              run_fn=double_sample,
              out_types=[types.DALIDataType.UINT8],
              in_types=[types.DALIDataType.UINT8],
              outs_ndim=[1],
              ins_ndim=[1],
              batch_processing=False,
          )
          out_from_const = dali_numba.fn.experimental.numba_function(
              [42],
              run_fn=double_sample,
              out_types=[types.DALIDataType.INT32],
              in_types=[types.DALIDataType.INT32],
              outs_ndim=[1],
              ins_ndim=[1],
              batch_processing=False,
          )
          return out, out_from_const
  
      pipe = numba_pipe()
      pipe.build()
      out0, out1 = pipe.run()
      expect_tensor_list(out0, out1)
      assert np.array_equal(
          np.array(out0.as_tensor()), np.full((2, 2), 84)
      )
      assert np.array_equal(
          np.array(out1.as_tensor()), np.full((2, 1), 84)
      )
  
imports: from pathlib import Path
  import numpy
  from typing import cast, Sequence, Union
  from nvidia.dali import fn, ops
  from nvidia.dali import types, tensors
  from nvidia.dali.data_node import DataNode
  from nvidia.dali.pipeline import pipeline_def, Pipeline
  from test_utils import get_dali_extra_path, check_numba_compatibility_cpu
  from nose.plugins.attrib import attr
label_desc: Use image node_id 12 for calling a global function with example usage: test_numba_plugin() and returns: out,  out_from_const