Create a function that takes in a Roman numeral as a string and converts it to an integer, returning the result. The function should work for all Roman numerals representing positive integers less than 4000.
The following table shows how digits will be represented in Roman numeral notation:
| Place value | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| Ones | I | II | III | IV | V | VI | VII | VIII | IX |
| Tens | X | XX | XXX | XL | L | LX | LXX | LXXX | XC |
| Hundreds | C | CC | CCC | CD | D | DC | DCC | DCCC | CM |
| Thousands | M | MM | MMM | - | - | - | - | - | - |
parse_roman_numeral("VII") ➞ 7
parse_roman_numeral("DCLXXIX") ➞ 679
parse_roman_numeral("MMMCMV") ➞ 3905