input: Write a python function to convert Roman numerals to Arabic numbers.
  assert roman_to_arabic('MCMXCVIII') == 1998
  assert roman_to_arabic('IV') == 4
  assert roman_to_arabic('MMXXI') == 2021
  assert roman_to_arabic('CDXLIV') == 444
output: def roman_to_arabic(roman):
      roman_numerals = {
          'I': 1,
          'V': 5,
          'X': 10,
          'L': 50,
          'C': 100,
          'D': 500,
          'M': 1000
      }
      
      total = 0
      prev_value = 0
      
      for char in reversed(roman):
          value = roman_numerals[char]
          if value < prev_value:
              total -= value
          else:
              total += value
          prev_value = value
      
      return total