code: def test_scalar_constant():
      pipe = Pipeline(batch_size=1, num_threads=1, device_id=0)
  
      image1 = np.array(
          [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]], dtype=np.uint8
      )[:, :, np.newaxis]
      image2 = np.array([[10, 20], [30, 40], [50, 60]], dtype=np.uint8)[
          :, :, np.newaxis
      ]
      batches = [[image1], [image2]]
  
      inputs = fn.external_source(lambda: batches, 2, layout="HWC")
      rotated = fn.rotate(inputs, angle=types.ScalarConstant(90))
      pipe.set_outputs(*rotated, types.ScalarConstant(90))
  
      pipe.build()
      outs = pipe.run()
      arr1 = outs[0].at(0)
      arr2 = outs[1].at(0)
      arr3 = outs[2].at(0)
      ref1 = np.array([[4, 8, 12], [3, 7, 11], [2, 6, 10], [1, 5, 9]])[
          :, :, np.newaxis
      ]
      ref2 = np.array([[20, 40, 60], [10, 30, 50]], dtype=np.uint8)[
          :, :, np.newaxis
      ]
      ref3 = np.array(90)
      assert np.array_equal(arr1, ref1)
      assert np.array_equal(arr2, ref2)
      assert np.array_equal(arr3, ref3)
  
imports: import nvidia.dali.fn
  import nvidia.dali.ops
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.types
  import numpy
  from nose_utils import assert_raises
  import sys
  import inspect
  from nose.plugins.attrib import attr
  import nose
label_desc: Use image node_id 8 for calling a global function with example usage: test_scalar_constant() without return types