code: def test_per_frame():
      def window_size(sample_desc):
          return np.array(
              2 * sample_desc.rng.randint(1, 15) + 1, dtype=np.int32
          )
  
      def per_axis_window_size(sample_desc):
          return np.array([window_size(sample_desc) for _ in range(2)])
  
      def per_axis_smoothing_size(sample_desc):
          return np.array(
              [
                  2 * sample_desc.rng.randint(0, 15) + 1
                  for _ in range(2)
              ],
              dtype=np.int32,
          )
  
      def per_axis_scale(sample_desc):
          def scale(sample_desc):
              k = 2 * sample_desc.rng.randint(0, 15) + 1
              return np.array(2.0**-k, dtype=np.float32)
  
          return np.array([scale(sample_desc) for _ in range(2)])
  
      video_test_cases = [
          (fn.laplacian, {}, []),
          (fn.laplacian, {}, [ArgCb("window_size", window_size, True)]),
          (
              fn.laplacian,
              {},
              [ArgCb("window_size", per_axis_window_size, True)],
          ),
          (
              fn.laplacian,
              {"dtype": types.FLOAT},
              [ArgCb("scale", per_axis_scale, True)],
          ),
          (
              fn.laplacian,
              {},
              [
                  ArgCb("window_size", per_axis_window_size, True),
                  ArgCb(
                      "smoothing_size", per_axis_smoothing_size, True
                  ),
              ],
          ),
          (
              fn.laplacian,
              {},
              [
                  ArgCb("window_size", per_axis_window_size, True),
                  ArgCb(
                      "smoothing_size", per_axis_smoothing_size, True
                  ),
                  ArgCb("scale", per_axis_scale, True),
              ],
          ),
      ]
  
      yield from video_suite_helper(
          video_test_cases, expand_channels=True
      )
  
imports: from nvidia.dali.pipeline import pipeline_def
  import nvidia.dali.types
  import nvidia.dali.fn
  import numpy
  import cv2
  from scipy.ndimage import convolve1d, filters
  import os
  from nose_utils import assert_raises
  from nose.plugins.attrib import attr
  from sequences_test_utils import video_suite_helper, ArgCb
  from test_utils import get_dali_extra_path, check_batch, RandomlyShapedDataIterator
label_desc: Use image node_id 28 for calling a global function with example usage: test_per_frame() and returns: np, np, np, np, np