code: def apnumber(value):
      
      try:
          value = int(value)
      except (TypeError, ValueError):
          return value
      if not 0 < value < 10:
          return str(value)
      return (_('one'), _('two'), _('three'), _('four'), _('five'), _('six'),
              _('seven'), _('eight'), _('nine'))[value - 1]
docs: For numbers 1-9, returns the number spelled out. Otherwise, returns the
      number. This follows Associated Press style.  This always returns a string
      unless the value was not int-able, unlike the Django filter.