def cast_contours(contours, x, y):
    """
    Convenience function to cast contour(s) to a given x,y.

    Parameters
    ----------
    contours : list or ndarray
        Contour(s) to cast.
    x : int
        x position to cast to.
    y : int
        y position to cast to.

    Returns
    -------
    contours : list of ndarray
        Contours casted to new coordinates.

    See Also
    --------
    find_contours
    draw_contours

    """
    if isinstance(contours, list):
        for i, c in enumerate(contours):
            c[:, 0, 0] += x
            c[:, 0, 1] += y
            contours[i] = c
    else:
        contours[:, 0, 0] += x
        contours[:, 0, 1] += y
    return contours