code: def test_fail_laplacian():
      args = [
          (
              (20, 20, 30, 3),
              "DHCW",
              3,
              "Only channel-first or channel-last layouts are supported, got: .*\\.",
          ),
          (
              (5, 20, 30, 3),
              "HFWC",
              2,
              "For sequences, layout should begin with 'F' or 'C', got: .*\\.",
          ),
          (
              (5, 10, 10, 10, 7, 3),
              "FWXYZC",
              4,
              "Too many dimensions, found: \\d+ data axes, maximum supported is: 3\\.",
          ),
          (
              (5, 3, 20, 3, 30),
              "FCHCW",
              2,
              "Only channel-first or channel-last layouts are supported, got: .*\\.",
          ),
          (
              (5, 3, 20, 3, 30),
              "FCCHW",
              2,
              "Found more the one occurrence of 'F' or 'C' axes in layout: .*\\.",
          ),
          ((5, 3), "CF", 2, "No spatial axes found in the layout"),
      ]
      for device in "cpu", "gpu":
          for shape, layout, axes, err_regex in args:
              yield (
                  check_build_time_fail,
                  device,
                  10,
                  shape,
                  layout,
                  axes,
                  11,
                  11,
                  1.0,
                  False,
                  err_regex,
              )
          yield (
              check_tensor_input_fail,
              device,
              10,
              (
                  10,
                  10,
                  3,
              ),
              "HWC",
              11,
              11,
              1.0,
              False,
              types.UINT16,
              "Output data type must be same as input, FLOAT or skipped",
          )
  
          yield (
              check_build_time_fail,
              device,
              10,
              (
                  10,
                  10,
                  3,
              ),
              "HWC",
              2,
              11,
              11,
              1.0,
              True,
              "Parameter ``scale`` cannot be specified when ``normalized_kernel`` is set to True",
          )
          for window_size in [-3, 10, max_window_size + 1]:
              yield (
                  check_build_time_fail,
                  device,
                  10,
                  (
                      10,
                      10,
                      3,
                  ),
                  "HWC",
                  2,
                  window_size,
                  5,
                  1.0,
                  False,
                  "Window size must be an odd integer between 3 and \\d",
              )
              yield (
                  check_tensor_input_fail,
                  device,
                  10,
                  (
                      10,
                      10,
                      3,
                  ),
                  "HWC",
                  window_size,
                  5,
                  1.0,
                  False,
                  types.FLOAT,
                  "Window size must be an odd integer between 3 and \\d",
              )
          for window_size in [[3, 6], -1, max_window_size + 1]:
              yield (
                  check_build_time_fail,
                  device,
                  10,
                  (
                      10,
                      10,
                      3,
                  ),
                  "HWC",
                  2,
                  3,
                  window_size,
                  1.0,
                  False,
                  "Smoothing window size must be an odd integer between 1 and \\d",
              )
          for window_size in [6, -1, max_window_size + 1]:
              yield (
                  check_tensor_input_fail,
                  device,
                  10,
                  (
                      10,
                      10,
                      3,
                  ),
                  "HWC",
                  3,
                  window_size,
                  1.0,
                  False,
                  types.FLOAT,
                  "Smoothing window size must be an odd integer between 1 and \\d",
              )
          for window_size in [[3, 7, 3], [7, 7, 7, 7, 7]]:
              yield check_build_time_fail, device, 10, (
                  10,
                  10,
                  3,
              ), "HWC", 2, window_size, 11, 1.0, False, (
                  f'Argument "window_size" expects either a single value '
                  f"or a list of 2 elements. {len(window_size)} given"
              )
              yield check_tensor_input_fail, device, 10, (
                  10,
                  10,
                  3,
              ), "HWC", window_size, 11, 1.0, False, types.FLOAT, (
                  f"Argument window_size for sample 0 is expected to have "
                  f"1 or 2 elements, got: {len(window_size)}"
              )
          for scale in [[3, 7, 3], [7, 7, 7, 7, 7]]:
              yield check_build_time_fail, device, 10, (
                  10,
                  10,
                  3,
              ), "HWC", 2, 3, 3, scale, False, (
                  f'Argument "scale" expects either a single value or a list '
                  f"of 2 elements. {len(scale)} given."
              )
              yield check_tensor_input_fail, device, 10, (
                  10,
                  10,
                  3,
              ), "HWC", 5, 5, scale, False, types.FLOAT, (
                  f"Argument scale for sample 0 is expected to have "
                  f"1 or 2 elements, got: {len(scale)}"
              )
  
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 27 for calling a global function with example usage: test_fail_laplacian() without return types