code: def rgb2bayer(img, pattern):
      h, w, c = img.shape
      assert c == 3
      h = h // 2 * 2
      w = w // 2 * 2
      r, g, b = rgb_bayer_masks((h, w), pattern)
      return (
          img[:h, :w, 0] * r + img[:h, :w, 1] * g + img[:h, :w, 2] * b
      )
  
file_path: DALI/dali/test/python/debayer_test_utils.py
imports: import numpy
  from scipy.signal import convolve2d
label_desc: Use image node_id 4 for calling a global function with example usage: rgb2bayer(img, pattern) and returns: unknown