Pregunta de entrevista de PLAYSTUDIOS

How would you implement a function where you can convert Roman numerals to integers?