code: def validate_and_normalize_bboxes(
      bboxes: List[Tuple], bbox_format: str, src_w: int, src_h: int
  ) -> List[Tuple]:
      norm_bboxes = []
      for bbox in bboxes:
          assert len(bbox) == 4 and all(
              isinstance(x, (float, int)) for x in bbox
          ), f"Bounding boxes must be tuples of 4 floats; {bbox} is invalid"
  
          norm_bboxes.append(
              normalize_bbox(bbox, bbox_format, src_w, src_h)
          )
  
          assert (
              0 <= norm_bboxes[-1][0] <= norm_bboxes[-1][2] <= 1
              and 0 <= norm_bboxes[-1][1] <= norm_bboxes[-1][3] <= 1
          ), f"Bounding box {bbox} is invalid or is not in {bbox_format} format"
  
      return norm_bboxes
  
file_path: AugLy/augly/image/utils/metadata.py
imports: from copy import deepcopy
  from typing import Any, Callable, Dict, List, Optional, Tuple
  from augly.image import intensity
  from augly.image.utils import bboxes
  from PIL import Image
label_desc: Use image node_id 2 for calling a global function with example usage: validate_and_normalize_bboxes(bboxes, bbox_format, src_w, src_h) and returns: norm_bboxes