code: def _merge_boxes(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(),
          ]
      ]
  
imports: import xml.etree.ElementTree
  from collections import defaultdict
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import numpy
  from prettytable import PrettyTable
  from tqdm import tqdm
  import json
  import os
  import re
label_desc: Use image node_id 9 for calling a global function with example usage: _merge_boxes(boxes) and returns: list, boxes