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: arena.rs
    path of file: ./repos/high-assurance-rust/code_snippets/chp12/diff_fuzz/src/tree
    
    the code of the file until where you have to start completion: use core::ops::{Index, IndexMut};
use core::slice::{Iter, IterMut};

use super::node::{Node, NodeGetHelper, NodeSwapHistHelper};
use super::node_dispatch::SmallNode;

use smallnum::SmallUnsigned;
use tinyvec::ArrayVec;

/*
Note:

Structures in this file generic for `U` in a *subset* of the set `(u8, u16, u32, u64, u128)`.
All members in subset are <= host pointer width in size.
If caller obeys contract, `U` will be smallest unsigned capable of representing const `N` (e.g. static capacity).
*/

/// An arena allocator, meta programmable
    
    fn test_add_and_remove() {
        let mut arena: Arena<isize, &str, small_unsigned!(CAPACITY), CAPACITY> = Arena::new();

        let n_1_idx = arena.add(1, "n/a");
        let n_2_idx = arena.add(2, "n/a");
        let n_3_idx = arena.add(3, "n/a");

        assert_eq!(n_1_idx, 0);
        assert_eq!(n_2_idx, 1);
        assert_eq!(n_3_idx, 2);

        let n_2_removed = arena.remove(n_2_idx).unwrap();
        assert_eq!(n_2_removed.key(), &2);
        assert!(arena.vec[1].is_none());

        let n_4_idx = arena.add(4, "n/a");
        assert_eq!(n_4_idx, 1);

        let n_5_idx = arena.add(5, "n/a");
        assert_eq!(n_5_idx, 3);
    }