code: def rgb2bayer_seq(seq, patterns):
      f, h, w, c = seq.shape
      assert f == len(patterns)
      assert c == 3
      h = h // 2 * 2
      w = w // 2 * 2
      bayer_masks = {
          pattern: rgb_bayer_masks((h, w), pattern)
          for pattern in bayer_patterns
      }
      seq_masks = [bayer_masks[pattern] for pattern in patterns]
      reds, greens, blues = [
          np.stack(channel) for channel in zip(*seq_masks)
      ]
      return (
          seq[:, :h, :w, 0] * reds
          + seq[:, :h, :w, 1] * greens
          + seq[:, :h, :w, 2] * blues
      )
  
file_path: DALI/dali/test/python/debayer_test_utils.py
imports: import numpy
  from scipy.signal import convolve2d
label_desc: Use image node_id 5 for calling a global function with example usage: rgb2bayer_seq(seq, patterns) and returns: unknown