def rescale_contours(cnts, ratio):
    """
    Rescales contours based on scalling `ratio`.

    Args:
        cnts (list of contour objects):
            List of `numpy.ndarray` objects representing contours from OpenCV.
        ratio (float):
            Float value used to rescale all the points in contours list.
    Returns:
        list of contour objects:
            List of contour objects after rescaling.
    """
    cnts_rescaled = []
    for c in cnts:
        c = c.astype("float")
        c *= ratio
        c = c.astype("int")
        cnts_rescaled.append(c)
    return cnts_rescaled