pub fn create_filter_wrapper<F, R>( filter: Rc<dyn Fn(Rc<dyn Fn() -> R>) -> Rc<RefCell<Option<R>>>>, func: F, ) -> impl Fn() -> Rc<RefCell<Option<R>>> + Clonewhere F: Fn() -> R + Clone + 'static, R: 'static,