Convert Roman numeral to integers.
Implement roman_to_integer(s), which accepts a valid uppercase Roman numeral and returns its integer value. Handle subtractive pairs such as IV, IX, XL, XC, CD, and CM.
Input is a string representing a canonical Roman numeral from 1 through 3999. Return an integer.
def roman_to_integer(s):