'Construct and return the next enumerated list item marker, and an
auto-enumerator ("#" instead of the regular enumerator).
Return ``None`` for invalid (out of range) ordinals.'

def make_enumerator(self, ordinal, sequence, format):

    if (sequence == '#'):
        enumerator = '#'
    elif (sequence == 'arabic'):
        enumerator = str(ordinal)
    else:
        if sequence.endswith('alpha'):
            if (ordinal > 26):
                return None
            enumerator = chr(((ordinal + ord('a')) - 1))
        elif sequence.endswith('roman'):
            try:
                enumerator = roman.toRoman(ordinal)
            except roman.RomanError:
                return None
        else:
            raise ParserError(('unknown    enumerator    sequence:    "%s"' % sequence))
        if sequence.startswith('lower'):
            enumerator = enumerator.lower()
        elif sequence.startswith('upper'):
            enumerator = enumerator.upper()
        else:
            raise ParserError(('unknown    enumerator    sequence:    "%s"' % sequence))
    formatinfo = self.enum.formatinfo[format]
    next_enumerator = (((formatinfo.prefix + enumerator) + formatinfo.suffix) + '    ')
    auto_enumerator = (((formatinfo.prefix + '#') + formatinfo.suffix) + '    ')
    return (next_enumerator, auto_enumerator)
