code: def read_and_convert_boxes(video_box_path, num_boxes=4):
      """Convert annotation in tracking orders."""
      if not os.path.exists(video_box_path):
          return None
      num_frames = len(os.listdir(video_box_path))
      box_tensors = np.zeros(
          (num_frames, num_boxes, 5), dtype=np.float32
      )
      for i in range(num_frames):
          frame_name = f"{video_box_path}/{i + 1:04d}.npz"
          frame_data = dict(np.load(open(frame_name, "rb")))
          hand_idx, obj_idx = 0, 2
          for ibox in range(len(frame_data["boxes"])):
              standard_category = frame_data["pred_classes"][ibox]
              assert standard_category in [0, 1]
              global_box_id = standard_category
              if global_box_id == 0:
                  global_box_id = hand_idx
                  hand_idx += 1
              elif global_box_id == 1:
                  global_box_id = obj_idx
                  obj_idx += 1
              if global_box_id < num_boxes:
                  box_tensors[i, global_box_id, :4] = frame_data[
                      "boxes"
                  ][ibox]
                  box_tensors[i, global_box_id, 4] = frame_data[
                      "scores"
                  ][ibox]
      return box_tensors
  
file_path: scenic/scenic/projects/objectvivit/tools/add_orvit_bbox_to_tfrecord.py
imports: import os
  from absl import app
  from absl import flags
  import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: read_and_convert_boxes(video_box_path, num_boxes) and returns: box_tensors, None