@staticmethod
def get_sizes(count, share, validation=False):
    """With `count` samples, returns how many should go to train and test

        """
    if count == 1:
        if validation:
            return 1, 0, 0
        else:
            return 1, 0
    if count == 2:
        if validation:
            return 1, 1, 0
        else:
            return 1, 1
    n_train = int(count * share)
    assert n_train < count
    if n_train == 0:
        n_train += 1
    if not validation:
        return n_train, count - n_train
    elif count - n_train == 1:
        n_train -= 1
        return n_train, 1, 1
    else:
        n_val = int(int(count - n_train) / 2)
        return n_train, n_val, count - n_train - n_val
