code: def merge_pred_gt_boxes(pred_dict, gt_dict=None):
      """
      Merge data from precomputed and ground-truth boxes dictionaries.
      Args:
          pred_dict (dict): a dict which maps from `frame_idx` to a list of `boxes`
              and `labels`. Each `box` is a list of 4 box coordinates. `labels[i]` is
              a list of labels for `boxes[i]`.
          gt_dict (Optional[dict]): a dict which maps from `frame_idx` to a list of `boxes`
              and `labels`. Each `box` is a list of 4 box coordinates. `labels[i]` is
              a list of labels for `boxes[i]`. Note that label is -1 for predicted boxes.
      Returns:
          merged_dict (dict): merged dictionary from `pred_dict` and `gt_dict` if given.
              It is a dict which maps from `frame_idx` to a list of [`is_gt`, `boxes`, `labels`],
              where `is_gt` is a boolean indicate whether the `boxes` and `labels` are ground-truth.
      """
      merged_dict = {}
      for key, item in pred_dict.items():
          merged_dict[key] = [[False, item[0], item[1]]]
  
      if gt_dict is not None:
          for key, item in gt_dict.items():
              if merged_dict.get(key) is None:
                  merged_dict[key] = [[True, item[0], item[1]]]
              else:
                  merged_dict[key].append([True, item[0], item[1]])
      return merged_dict
  
imports: import numpy
  import os
  import cv2
  import torch
  import tqdm
  import slowfast.utils.checkpoint
  import slowfast.utils.logging
  from slowfast.datasets.ava_helper import parse_bboxes_file
  from slowfast.datasets.cv2_transform import scale, scale_boxes
  from slowfast.datasets.utils import get_sequence
  from slowfast.models import build_model
  from slowfast.utils import misc
  from slowfast.utils.env import pathmgr
  from slowfast.visualization.utils import process_cv2_inputs
  from slowfast.visualization.video_visualizer import VideoVisualizer
label_desc: Use image node_id 1 for calling a global function with example usage: merge_pred_gt_boxes(pred_dict, gt_dict) and returns: merged_dict