def _id_to_leaf_idx_to_chunk_clones(ids_and_extents: Iterable[Tuple[(InodeID, Extent)]]):
    'Aggregates newly created ChunkClones per InodeID, and per "trimmed leaf"'
    id_to_leaf_idx_to_chunk_clones = defaultdict(dict)
    for (extent_id, clone_ops) in _leaf_extent_id_to_clone_ops(ids_and_extents).items():
        leaf_ref_to_chunk_clones = _leaf_ref_to_chunk_clones_from_clone_ops(extent_id, clone_ops)
        for (leaf_ref, offsets_clones) in leaf_ref_to_chunk_clones.items():
            d = id_to_leaf_idx_to_chunk_clones[leaf_ref.clone.inode_id]
            assert (leaf_ref.leaf_idx not in d)
            d[leaf_ref.leaf_idx] = offsets_clones
    return id_to_leaf_idx_to_chunk_clones
Aggregates newly created ChunkClones per InodeID, and per "trimmed leaf"
def _id_to_leaf_idx_to_chunk_clones(ids_and_extents: Iterable[Tuple[(InodeID, Extent)]]):
    
    id_to_leaf_idx_to_chunk_clones = defaultdict(dict)
    for (extent_id, clone_ops) in _leaf_extent_id_to_clone_ops(ids_and_extents).items():
        leaf_ref_to_chunk_clones = _leaf_ref_to_chunk_clones_from_clone_ops(extent_id, clone_ops)
        for (leaf_ref, offsets_clones) in leaf_ref_to_chunk_clones.items():
            d = id_to_leaf_idx_to_chunk_clones[leaf_ref.clone.inode_id]
            assert (leaf_ref.leaf_idx not in d)
            d[leaf_ref.leaf_idx] = offsets_clones
    return id_to_leaf_idx_to_chunk_clones