code: def bound_bboxes(bboxes):
      
      group_x0 = min(map(lambda l: l[x0], bboxes))
      group_y0 = min(map(lambda l: l[y0], bboxes))
      group_x1 = max(map(lambda l: l[x1], bboxes))
      group_y1 = max(map(lambda l: l[y1], bboxes))
      return (group_x0, group_y0, group_x1, group_y1)
docs: Finds the minimal bbox that contains all given bboxes