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
Return an old style protocol buffer object.
dataset/ETHPy150Open enthought/pyface/pyface/tasks/action/task_action_manager_builder.py/TaskActionManagerBuilder._group_items_by_id--crossover with--dataset/ETHPy150Open google/grr/grr/lib/rdfvalues/structs.py/RDFProtoStruct.AsPrimitiveProto