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