fn wrap_item<W, F>(w: &mut W, f: F)where
    W: Write,
    F: FnOnce(&mut W),