code: def crop_roi(frames_array, roi_bound, roi_size=(96, 96)):
      frames_num = frames_array.shape[0]
      assert frames_num == roi_bound.shape[0]
      roi_array = []
      for frame_idx in range(frames_num):
          roi_array.append(
              crop_frame_roi(
                  frame=frames_array[frame_idx],
                  roi_bound=roi_bound[frame_idx],
                  roi_size=roi_size,
              )
          )
      return np.stack(roi_array, axis=0)
  
file_path: espnet/egs2/misp2021/avsr1/local/prepare_far_video_roi.py
imports: import argparse
  import codecs
  import json
  import os
  import time
  from multiprocessing import Pool
  import cv2
  import numpy
  from tqdm import tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: crop_roi(frames_array, roi_bound, roi_size) and returns: np