<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_indexed_dictionary(self, group=0):
 """ Creates a dict of lists of Wells. Which way the labware is segmented determines whether this is a dict of rows or dict of columns. If group is 1, then it will collect wells that have the same alphabetic prefix and therefore are considered to be in the same row. If group is 2, it will collect wells that have the same numeric postfix and therefore are considered to be in the same column. """

        dict_list = defaultdict(list)
        for index, well_obj in zip(self._ordering, self._wells):
            dict_list[self._pattern.match(index).group(group)].append(well_obj)
        return dict_list