pub fn get_custom<R: CheckDivergence>(
        &self,
        name: &str,
        mut action: impl FnMut(ShadowRef<'_, Main, Shadow>) -> R,
    ) -> R {
        let main_output = action(ShadowRef::Main(self.main.as_ref()));
        let borrow = self.shadow.borrow();
        if let Some(shadow) = &*borrow {
            let shadow_output = action(ShadowRef::Shadow(&shadow.vm));
            let errors = main_output.check_divergence(&shadow_output);
            if let Err(err) = errors.into_result() {
                drop(borrow);
                self.report_shared(err.context(format!("get({name})")));
            }
        }
        main_output
    }
Same as [`Self::get()`], but uses custom divergence checks for the type encapsulated in the [`CheckDivergence`] trait.
core/lib/vm_interface/src/utils/shadow.rs