def _points2bbox(points):
    """Calculate the smallest bbox that contains the points.
    NOTE: When performing transformations, the bboxes have to be recalculated.

    Parameters
    ----------
    points: [(x int, y int)]
        list of x,y points.

    Return
    ------
    retval: (x int,y int,x int,y int)
        bbox
    """
    xs, ys = zip(*points)
    return min(xs), min(ys), max(xs), max(ys)
