class_docstr: Phrase Grounding Metric.
class_docstr_tok: ["Phrase","Grounding","Metric","."]
docstr: Return the boxes corresponding to the smallest enclosing box
  containing all the provided boxes The boxes are expected in [x1, y1,
  x2, y2] format.
docstr_tok: ["Return","the","boxes","corresponding","to","the","smallest","enclosing","box","containing","all","the","provided","boxes","The","boxes","are","expected","in","[","x1",",","y1",",","x2",",","y2","]","format","."]
code: def merge_boxes(self, boxes: List[List[int]]) -> List[List[int]]:
      """Return the boxes corresponding to the smallest enclosing box
      containing all the provided boxes The boxes are expected in [x1, y1,
      x2, y2] format."""
      if len(boxes) == 1:
          return boxes
  
      np_boxes = np.asarray(boxes)
  
      return [
          [
              np.boxes[:, 0].min(),
              np_boxes[:, 1].min(),
              np_boxes[:, 2].max(),
              np_boxes[:, 3].max(),
          ]
      ]
  
file_path: mmdetection/mmdet/evaluation/metrics/flickr30k_metric.py
imports: from collections import defaultdict
  from typing import Dict, List, Optional, Sequence
  import numpy
  from mmengine.evaluator import BaseMetric
  from mmengine.logging import MMLogger
  from mmdet.registry import METRICS
  from ..functional import bbox_overlaps
label_desc: Use image node_id 2 for calling the Flickr30kMetric obj's underlying member method code with example usage: obj.merge_boxes(boxes) and returns: list, boxes