def list_combinations_generator(modalities: list):
    'Generates combinations for items in the given list.\n\n        Args:\n            modalities: List of modalities available in the dataset.\n\n        Returns:\n            Combinations of items in the given list.\n    '
    modality_combinations = list()
    for length in range(1, (len(modalities) + 1)):
        current_length_combinations = itertools.combinations(modalities, length)
        for combination in current_length_combinations:
            current_combination_list = list()
            for k in combination:
                current_combination_list.append(k)
            modality_combinations.append(current_combination_list)
    return modality_combinations
Generates combinations for items in the given list.

Args:
    modalities: List of modalities available in the dataset.

Returns:
    Combinations of items in the given list.
def list_combinations_generator(modalities: list):
    'Generates combinations for items in the given list.\n\n        Args:\n            modalities: List of modalities available in the dataset.\n\n        Returns:\n            Combinations of items in the given list.\n    '
    modality_combinations = list()
    for length in range(1, (len(modalities) + 1)):
        current_length_combinations = itertools.combinations(modalities, length)
        for combination in current_length_combinations:
            current_combination_list = list()
            for k in combination:
                current_combination_list.append(k)
            modality_combinations.append(current_combination_list)
    return modality_combinations