code: def process_cv2_inputs(frames, cfg):
      """
      Normalize and prepare inputs as a list of tensors. Each tensor
      correspond to a unique pathway.
      Args:
          frames (list of array): list of input images (correspond to one clip) in range [0, 255].
          cfg (CfgNode): configs. Details can be found in
              slowfast/config/defaults.py
      """
      inputs = torch.from_numpy(np.array(frames)).float() / 255
      inputs = tensor_normalize(inputs, cfg.DATA.MEAN, cfg.DATA.STD)
      # T H W C -> C T H W.
      inputs = inputs.permute(3, 0, 1, 2)
      # Sample frames for num_frames specified.
      index = torch.linspace(
          0, inputs.shape[1] - 1, cfg.DATA.NUM_FRAMES
      ).long()
      inputs = torch.index_select(inputs, 1, index)
      inputs = pack_pathway_output(cfg, inputs)
      inputs = [inp.unsqueeze(0) for inp in inputs]
      return inputs
  
imports: import itertools
  import numpy
  import matplotlib.pyplot
  import torch
  from sklearn.metrics import confusion_matrix
  import slowfast.utils.logging
  from slowfast.datasets.utils import pack_pathway_output, tensor_normalize
label_desc: Use image node_id 6 for calling a global function with example usage: process_cv2_inputs(frames, cfg) and returns: inputs