May I suggest a small change to shorten the code:

    RE_MAP_RANGE_KEY = re.compile('^([1-9]|10)(-([1-9]|10))?$')

Instead remove lines 315-324.