def bounding_box(ptlist):
    """
    Returns the bounding box for the list of points, in the form
    (x1, y1, x2, y2), where (x1, y1) is the top left of the box and
    (x2, y2) is the bottom right of the box.
    """
    xs = [pt[0] for pt in ptlist]
    ys = [pt[1] for pt in ptlist]
    return (min(xs), max(ys), max(xs), min(ys))