docs: def format_number(number, format):
      """Format `number` according the given `format` (:class:`NumberFormat`)"""
      if format == NumberFormat.NUMBER:
          return str(number)
      elif format == NumberFormat.LOWERCASE_CHARACTER:
          string = ''
          while number > 0:
              number, ordinal = divmod(number, 26)
              if ordinal == 0:
                  ordinal = 26
                  number -= 1
              string = chr(ord('a') - 1 + ordinal) + string
          return string
      elif format == NumberFormat.UPPERCASE_CHARACTER:
          return format_number(number, 'lowercase character').upper()
      elif format == NumberFormat.LOWERCASE_ROMAN:
          return romanize(number).lower()
      elif format == NumberFormat.UPPERCASE_ROMAN:
          return romanize(number)
      elif format == NumberFormat.SYMBOL:
          return symbolize(number)
      elif format == NumberFormat.NONE:
          return ''
      else:
          raise ValueError("Unknown number format '{}'".format(format))