def standardize_sizes(sizes):
    """
    Removes trailing ones from a list.

    Parameters
    ----------
    sizes: List
        A list of integers.
    """
    while (sizes[-1] == 1) and len(sizes)>2:
        sizes = sizes[0:-1]

    return sizes