def _get_included_folds(folds, holdout_index = None):
    """
    Returns a list that contains the holds to include whe joining.

    If a holdout index is specified, it will not be included.

    :param folds: the folds to join
    :param holdout_index: an index to holdout

    :return: the folds to use when joining
    """

    return [folds[index] for index in range(len(folds)) if index != holdout_index]