pub fn contract_to_pydict<'py>( py: Python<'py>, contract: &Contract, ) -> PyResult<Bound<'py, PyDict>>