def _group_edges(self):
        edges_to_add = [[], []]
        for e in self._edges:
            new_edge = deepcopy(e)
            new_edge['data'].pop('id', None)
            uuid_list = new_edge['data'].pop('uuid_list', [])
            source = e['data']['source']
            target = e['data']['target']
            source_node = [x for x in self._nodes if
                           x['data']['id'] == source][0]
            target_node = [x for x in self._nodes if
                           x['data']['id'] == target][0]
            if source_node['data']['parent'] != '':
                new_edge['data']['source'] = source_node['data']['parent']
                e['data']['i'] = 'Virtual'
            if target_node['data']['parent'] != '':
                new_edge['data']['target'] = target_node['data']['parent']
                e['data']['i'] = 'Virtual'
            if e['data']['i'] == 'Virtual':
                if new_edge not in edges_to_add[0]:
                    edges_to_add[0].append(new_edge)
                    edges_to_add[1].append(uuid_list)
                else:
                    idx = edges_to_add[0].index(new_edge)
                    edges_to_add[1][idx] += uuid_list
                    edges_to_add[1][idx] = list(set(edges_to_add[1][idx]))
        for ze in zip(*edges_to_add):
            edge = ze[0]
            edge['data']['id'] = self._get_new_id()
            edge['data']['uuid_list'] = ze[1]
            self._edges.append(edge)