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/qdrant/lib/collection/src/collection_manager/tests
    
    the code of the file until where you have to start completion: mod test_search_aggregation;

use std::collections::{HashMap, HashSet};
use std::path::Path;
use std::sync::Arc;

use itertools::Itertools;
use parking_lot::RwLock;
use segment::data_types::vectors::only_default_vector;
use segment::entry::entry_point::SegmentEntry;
use segment::types::{PayloadFieldSchema, PayloadKeyType, PointIdType};
use tempfile::Builder;

use crate::collection_manager::fixtures::{build_segment_1, build_segment_2, empty_segment};
use crate::collection_manager::holders::proxy_segment::ProxySegment;
use crate::collection_manager::holders::segment_holder::{
    LockedSegment, LockedSegmentHolder, SegmentHolder, SegmentId,
};
use crate::collection_manager::segments_updater::upsert_points;
use crate::operations::point_ops::Poin
    
fn wrap_proxy(segments: LockedSegmentHolder, sid: SegmentId, path: &Path) -> SegmentId {
    let mut write_segments = segments.write();

    let temp_segment: LockedSegment = empty_segment(path).into();

    let optimizing_segment = write_segments.get(sid).unwrap().clone();

    let proxy_deleted_points = Arc::new(RwLock::new(HashSet::<PointIdType>::new()));
    let proxy_deleted_indexes = Arc::new(RwLock::new(HashSet::<PayloadKeyType>::new()));
    let proxy_created_indexes = Arc::new(RwLock::new(
        HashMap::<PayloadKeyType, PayloadFieldSchema>::new(),
    ));

    let proxy = ProxySegment::new(
        optimizing_segment,
        temp_segment,
        proxy_deleted_points,
        proxy_created_indexes,
        proxy_deleted_indexes,
    );

    let (new_id, _replaced_segments) = write_segments.swap(proxy, &[sid]);
    new_id
}