code: def pad_bboxes(feature_dict, num_pad_boxes):
      """Pad boxes to the same size."""
      bboxes = feature_dict["bboxes"]  # T x N x 4
  
      num_frames = tf.shape(bboxes)[0]
      input_length = tf.shape(bboxes)[1]
      input_length = tf.clip_by_value(input_length, 0, num_pad_boxes)
      bboxes = bboxes[:, :input_length]
  
      padding_length = tf.maximum(0, num_pad_boxes - input_length)
  
      paddings_boxes = tf.cast(
          tf.zeros((num_frames, padding_length, 4)), tf.float32
      )
      padded_bboxes = tf.concat([bboxes, paddings_boxes], axis=1)
      feature_dict["bboxes"] = padded_bboxes
      feature_dict.pop("score", None)
      return feature_dict
  
imports: from typing import Optional, Union
  from absl import logging
  from dmvr import builders
  from dmvr import processors
  import ml_collections
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: pad_bboxes(feature_dict, num_pad_boxes) and returns: feature_dict