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: map.rs
    path of file: ./repos/OctoBase/libs/jwst-codec-utils/src/doc_operation/yrs_op
    
    the code of the file until where you have to start completion: use phf::phf_map;

use super::*;

fn insert_op(doc: &yrs::Doc, nest_input: &YrsNestType, params: CRDTParam) {
    let map = match nest_input {
        YrsNestType::MapType(map) => map,
        _ => unreachable!(),
    };
    let mut trx = doc.transact_mut();
    map.insert(&mut trx, params.key, params.value).unwrap();
}

fn remove_op(doc: &yrs::Doc, nest_input: &YrsNestTy
    
    fn test_gen_map_ref_ops() {
        let doc = Doc::new();
        let map_ref = doc.get_or_insert_map("test_map");

        let ops_registry = OpsRegistry::new();

        let mut params = CRDTParam {
            op_type: OpType::CreateCRDTNestType,
            new_nest_type: CRDTNestType::Map,
            manipulate_source: ManipulateSource::NewNestTypeFromYDocRoot,
            insert_pos: InsertPos::BEGIN,
            key: String::from("test_key"),
            value: String::from("test_value"),
            nest_data_op_type: NestDataOpType::Insert,
        };

        ops_registry.operate_yrs_nest_type(&doc, YrsNestType::MapType(map_ref.clone()), params.clone());
        assert_eq!(map_ref.len(&doc.transact()), 1);
        params.nest_data_op_type = NestDataOpType::Delete;
        ops_registry.operate_yrs_nest_type(&doc, YrsNestType::MapType(map_ref.clone()), params.clone());
        assert_eq!(map_ref.len(&doc.transact()), 0);

        params.nest_data_op_type = NestDataOpType::Clear;
        ops_registry.operate_yrs_nest_type(&doc, YrsNestType::MapType(map_ref.clone()), params.clone());
        assert_eq!(map_ref.len(&doc.transact()), 0);
    }