def _set_available_combinations(self):
available = set()<EOL>combinations_map = {}<EOL>whitelist = None<EOL>if self.output_combinations:<EOL><INDENT>whitelist = self.output_combinations.split("<STR_LIT:|>")<EOL><DEDENT>self.max_width = <NUM_LIT:0><EOL>for output in range(len(self.layout["<STR_LIT>"])):<EOL><INDENT>for comb in combinations(self.layout["<STR_LIT>"], output + <NUM_LIT:1>):<EOL><INDENT>for mode in ["<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>string = self._get_string_and_set_width(comb, mode)<EOL>if whitelist and string not in whitelist:<EOL><INDENT>continue<EOL><DEDENT>if len(comb) == <NUM_LIT:1>:<EOL><INDENT>combinations_map[string] = (comb, None)<EOL><DEDENT>else:<EOL><INDENT>combinations_map[string] = (comb, mode)<EOL><DEDENT>available.add(string)<EOL><DEDENT><DEDENT><DEDENT>if whitelist:<EOL><INDENT>available = reversed([comb for comb in whitelist if comb in available])<EOL><DEDENT>self.available_combinations = deque(available)<EOL>self.combinations_map = combinations_map<EOL>
Generate all connected outputs combinations and
set the max display width while iterating.