code: def fromRoman(strng):
      
      if not strng:
          raise TypeError('Input can not be blank')
      if not romanNumeralPattern.search(strng):
          raise ValueError('Invalid Roman numeral: %s', strng)
  
      result = 0
      index = 0
      for numeral, integer in romanNumeralMap:
          while strng[index:index+len(numeral)] == numeral:
              result += integer
              index += len(numeral)
      return result
docs: convert Roman numeral to integer