code: def check_per_sample_gaussian_blur(
      batch_size,
      sigma_dim,
      window_size_dim,
      shape,
      layout,
      axes,
      op_type="cpu",
  ):
      pipe = Pipeline(batch_size=batch_size, num_threads=4, device_id=0)
      data = RandomlyShapedDataIterator(batch_size, max_shape=shape)
      with pipe:
          if sigma_dim is not None:
              sigma = fn.random.uniform(
                  range=[0.5, 3], shape=[sigma_dim]
              )
              sigma_arg = sigma
          else:
              # placeholder, so we can return something
              sigma = fn.random.coin_flip(probability=0)
              sigma_arg = None
  
          if window_size_dim is not None:
              window_radius = fn.random.uniform(
                  range=[5, 10], shape=[window_size_dim]
              )
              window_size = (
                  fn.cast(window_radius, dtype=types.INT32) * 2 + 1
              )
              window_arg = window_size
          else:
              window_size = fn.random.coin_flip(probability=0)
              window_arg = None
  
          input = fn.external_source(data, layout=layout)
          if op_type == "gpu":
              input = input.gpu()
          blurred = fn.gaussian_blur(
              input,
              device=op_type,
              sigma=sigma_arg,
              window_size=window_arg,
          )
          pipe.set_outputs(blurred, input, sigma, window_size)
      pipe.build()
  
      for _ in range(test_iters):
          result, input, sigma, window_size = pipe.run()
          if op_type == "gpu":
              result = result.as_cpu()
              input = input.as_cpu()
          input = to_batch(input, batch_size)
          sigma = to_batch(sigma, batch_size)
          window_size = to_batch(window_size, batch_size)
          baseline = []
          for i in range(batch_size):
              sigma_arg = sigma[i] if sigma is not None else None
              window_arg = (
                  window_size[i]
                  if window_size_dim is not None
                  else None
              )
              skip_axes = count_skip_axes(layout)
              baseline.append(
                  gaussian_baseline(
                      input[i], sigma_arg, window_arg, axes, skip_axes
                  )
              )
          check_batch(
              result,
              baseline,
              batch_size,
              max_allowed_error=1,
              expected_layout=layout,
          )
  
imports: from nvidia.dali.pipeline import Pipeline, pipeline_def
  import nvidia.dali.types
  import nvidia.dali.fn
  import numpy
  import cv2
  from scipy.ndimage import convolve1d
  import os
  from nose_utils import assert_raises, 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, compare_pipelines, RandomlyShapedDataIterator, dali_type
label_desc: Use image node_id 19 for calling a global function with example usage: check_per_sample_gaussian_blur(batch_size, sigma_dim, window_size_dim, shape, layout, axes, op_type) without return types