def truncate(data, sizes):
    """
    @param data - A list of a list of values
    @param sizes - A list of max sizes

    Shrink each value in data to it's corresponding max size
    Show truncation by replacing the last 2 characters with `..`
    """
    truncated = []
    for row in data:
        truncated_row = []
        for i in range(len(sizes)):
            size = sizes[i]
            column = row[i]
            if len(column) > size:
                truncated_row.append(column[:size - 2] + '..')
            else:
                truncated_row.append(column)
        truncated.append(truncated_row)
    return truncated