code: def laplacian_cv(
      imgs, window_size, in_type, out_type, scale, grayscale
  ):
      if out_type == types.UINT8 or (
          out_type is None and in_type == types.UINT8
      ):
          ddepth = cv2.CV_8U
      else:
          ddepth = cv2.CV_32F
      imgs = [
          cv2.Laplacian(
              img,
              ddepth=ddepth,
              ksize=window_size,
              borderType=cv2.BORDER_REFLECT_101,
              scale=scale,
          )
          for img in imgs
      ]
      if grayscale:
          imgs = [np.expand_dims(img, axis=2) for img in imgs]
      return imgs
  
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 5 for calling a global function with example usage: laplacian_cv(imgs, window_size, in_type, out_type, scale, grayscale) and returns: imgs