PyModule is a PyO3 type representing the Python module created through the interpreter API. A #[pymodule] function receives an &PyModule even when it does not otherwise use the value. section 6.4
Use the module handle to expose Rust functions to Python. After marking sum with #[pyfunction], call m.add_function(wrap_pyfunction!(sum, m)?)? inside the initializer. section 6.4
Registering a function
The initializer returns PyResult<()> and adds sum to the extension module: m.add_function(wrap_pyfunction!(sum, m)?)?; Python can then call rust_json.sum(...).
