<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _set_available_combinations(self):
 """ Generate all connected outputs combinations and set the max display width while iterating. """

        available = set()
        combinations_map = {}

        whitelist = None
        if self.output_combinations:
            whitelist = self.output_combinations.split("|")

        self.max_width = 0
        for output in range(len(self.layout["connected"])):
            for comb in combinations(self.layout["connected"], output + 1):
                for mode in ["clone", "extend"]:
                    string = self._get_string_and_set_width(comb, mode)
                    if whitelist and string not in whitelist:
                        continue
                    if len(comb) == 1:
                        combinations_map[string] = (comb, None)
                    else:
                        combinations_map[string] = (comb, mode)
                    available.add(string)

        # Preserve the order in which user defined the output combinations
        if whitelist:
            available = reversed([comb for comb in whitelist if comb in available])

        self.available_combinations = deque(available)
        self.combinations_map = combinations_map