The #[pymodule] macro now supports module functions that take a single argument as a &Bound<'_, PyModule>.
#[pymodule]
&Bound<'_, PyModule>