unsafe extern "C" fn run_closure<F, R>( capsule_ptr: *mut PyObject, args: *mut PyObject, kwargs: *mut PyObject, ) -> *mut PyObjectwhere F: Fn(&Bound<'_, PyTuple>, Option<&Bound<'_, PyDict>>) -> R + Send + 'static, for<'py> R: IntoPyCallbackOutput<'py, *mut PyObject>,