def bounding_box2D(coords):
    """Runs through a collection of x,y tuple pairs and 
    extracts the values (xmin,ymin),(xmax,ymax)."""
    xmin = coords[0][0]  ;   xmax = coords[0][0]
    ymin = coords[0][1]  ;   ymax = coords[0][1]
    for xy in coords[1:]:
        x, y, *_ = xy # if coordinates are not 2D then if only considers first two
        if x < xmin: xmin = x
        if x > xmax: xmax = x
        if y < ymin: ymin = y
        if y > ymax: ymax = y
    return [(xmin, ymin),(xmax, ymax)]