let python_obj = Python::attach(|py| self.inner.clone_ref(py));
let cached_name = self.cached_name.clone();

{{ param_cloning }}

tokio::task::spawn_blocking(move || {
    Python::attach(|py| {
        let obj = python_obj.bind(py);

        {{ call }}
            .and_then(|v| v.extract::<{{ extract_ty }}>())
            .map_err(|e| {{ error_expr }})
    })
})
.await
.map_err(|e| {{ spawn_error_expr }})
.flatten()
