You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/tantivy/columnar/src/column_index/merge
    
    the code of the file until where you have to start completion: mod shuffled;
mod stacked;

use common::ReadOnlyBitSet;
use shuffled::merge_column_index_shuffled;
use stacked::merge_column_index_stacked;

use crate::column_index::SerializableColumnIndex;
use crate::{Cardinality, ColumnIndex, MergeRowOrder};

fn detect_cardinality_single_column_index(
    column_index: &ColumnIndex,
    alive_bitset_opt: &Option<ReadOnlyBitSet>,
) -> Cardinality {
    let Some(alive_bitset) = alive_bitset_opt else {
        return column_index.get_cardinality();
    };
    let cardinality_before_deletes = column_index.get_cardinality();
    if cardinality_before_deletes == Cardinality::Full {
        // The columnar cardinality can only become more restrictive in the presence of deletes
        // (where cardinality sorted from the
    
    fn test_merge_index_multivalued_sorted_several_segment() {
        let column_indexes: Vec<ColumnIndex> = vec![
            MultiValueIndex::for_test(&[0, 2, 5]).into(),
            ColumnIndex::Empty { num_docs: 0 },
            MultiValueIndex::for_test(&[0, 1, 4]).into(),
        ];
        let merge_row_order: MergeRowOrder = ShuffleMergeOrder::for_test(
            &[2, 0, 2],
            vec![
                RowAddr {
                    segment_ord: 2u32,
                    row_id: 1u32,
                },
                RowAddr {
                    segment_ord: 0u32,
                    row_id: 0u32,
                },
                RowAddr {
                    segment_ord: 2u32,
                    row_id: 0u32,
                },
            ],
        )
        .into();
        let merged_column_index = merge_column_index(&column_indexes[..], &merge_row_order);
        let SerializableColumnIndex::Multivalued(start_index_iterable) = merged_column_index else {
            panic!("Excpected a multivalued index")
        };
        let start_indexes: Vec<RowId> = start_index_iterable.boxed_iter().collect();
        assert_eq!(&start_indexes, &[0, 3, 5, 6]);
    }