code: def union_of_bboxes(
      height: int,
      width: int,
      bboxes: Sequence[BoxType],
      erosion_rate: float = 0.0,
  ) -> BoxType:
      """Calculate union of bounding boxes.
  
      Args:
          height (float): Height of image or space.
          width (float): Width of image or space.
          bboxes (List[tuple]): List like bounding boxes. Format is `[(x_min, y_min, x_max, y_max)]`.
          erosion_rate (float): How much each bounding box can be shrinked, useful for erosive cropping.
              Set this in range [0, 1]. 0 will not be erosive at all, 1.0 can make any bbox to lose its volume.
  
      Returns:
          tuple: A bounding box `(x_min, y_min, x_max, y_max)`.
  
      """
      x1, y1 = width, height
      x2, y2 = 0, 0
      for bbox in bboxes:
          x_min, y_min, x_max, y_max = bbox[:4]
          w, h = x_max - x_min, y_max - y_min
          lim_x1, lim_y1 = (
              x_min + erosion_rate * w,
              y_min + erosion_rate * h,
          )
          lim_x2, lim_y2 = (
              x_max - erosion_rate * w,
              y_max - erosion_rate * h,
          )
          x1, y1 = np.min([x1, lim_x1]), np.min([y1, lim_y1])
          x2, y2 = np.max([x2, lim_x2]), np.max([y2, lim_y2])
      return x1, y1, x2, y2
  
imports: from __future__ import division
  from typing import Any, Dict, List, Optional, Sequence, Tuple, TypeVar, cast
  import numpy
  from .transforms_interface import BoxInternalType, BoxType
  from .utils import DataProcessor, Params
label_desc: Use image node_id 14 for calling a global function with example usage: union_of_bboxes(height, width, bboxes, erosion_rate) and returns: x1,  y1,  x2,  y2