Get all parent item IDs for each item in dict keys.

def get_id2parents(objs):
    """Get all parent item IDs for each item in dict keys."""
    id2parents = {}
    for obj in objs:
        _get_id2parents(id2parents, obj.item_id, obj)
    return id2parents