code: def sum_string(amount, gender, items):
      
      try:
          if isinstance(items, six.string_types):
              uitems = smart_text(items, encoding, default_uvalue)
          else:
              uitems = [smart_text(i, encoding) for i in items]
          res = numeral.sum_string(amount, getattr(numeral, str(gender), None), uitems)
      except Exception as err:
          # because tag's renderer must die silently
          res = default_value % {'error': err, 'value': str(amount)}
      return res
docs: in_words and choose_plural in a one flask
      Makes in-words representation of value with
      choosing correct form of noun.
  
      First parameter is an amount of objects. Second is a
      gender (MALE, FEMALE, NEUTER). Third is a variants
      of forms for object name.
  
      Examples::
          {% sum_string some_int MALE "пример,примера,примеров" %}
          {% sum_string some_other_int FEMALE "задача,задачи,задач" %}