def _group_items_by_id(self, items):

        ordered_items_ids = []
        id_to_items = defaultdict(list)

        for item in items:
            if item.id not in id_to_items:
                ordered_items_ids.append(item.id)
            id_to_items[item.id].append(item)

        return id_to_items, ordered_items_ids
Group a list of action items by their ID.
dataset/ETHPy150Open enthought/pyface/pyface/tasks/action/task_action_manager_builder.py/TaskActionManagerBuilder._group_items_by_id