[python] refactor roman numerals