def get_lanes_bounding_box(lanes, extra_lateral=3) -> Tuple:
    """
    Return (x_max, x_min, y_max, y_min) as bounding box of this road
    :param lanes: Lanes in this road
    :param extra_lateral: extra width in lateral direction, usually sidewalk width
    :return: x_max, x_min, y_max, y_min
    """
    if isinstance(lanes[0], PGLane):
        line_points = get_curve_contour(lanes, extra_lateral) if isinstance(lanes[0], CircularLane) \
            else get_straight_contour(lanes, extra_lateral)
    else:
        line_points = get_interpolating_lane_contour(lanes)
    return get_points_bounding_box(line_points)

    Return (x_max, x_min, y_max, y_min) as bounding box of this road
    :param lanes: Lanes in this road
    :param extra_lateral: extra width in lateral direction, usually sidewalk width
    :return: x_max, x_min, y_max, y_min
    
metadrive/utils/pg/utils.py