Domanda di colloquio di CDAP

Write a function that accepts a string containing a Roman numeral, and return the equivalent integer number.