def merge_groups(self, indices):
try:<EOL><INDENT>merged = merge_dict_of_lists(self.dicom_groups, indices,<EOL>pop_later=True, copy=True)<EOL>self.dicom_groups = merged<EOL><DEDENT>except IndexError:<EOL><INDENT>raise IndexError('<STR_LIT>')<EOL><DEDENT>
Extend the lists within the DICOM groups dictionary.
        The indices will indicate which list have to be extended by which
        other list.

        Parameters
        ----------
        indices: list or tuple of 2 iterables of int, bot having the same len
             The indices of the lists that have to be merged, both iterables
             items will be read pair by pair, the first is the index to the
             list that will be extended with the list of the second index.
             The indices can be constructed with Numpy e.g.,
             indices = np.where(square_matrix)