import itertools


def combinator(combi):
    """Given a n-sized 1D array, generates all possible configurations, from
    size 1 to n-1. 'None' will indicate to use the original combination.

    :param combi: List of size n.
    :return: List of combinations.
    """
    cb = [
        list(itertools.combinations(combi, i)) for i in range(1, combi[-1] + 1)
    ]  # Get all possible wel combinations
    # Flatten
    cb = [item for sublist in cb for item in sublist]
    return cb