code: def choose_plural(amount, variants):
      
      try:
          if isinstance(variants, six.string_types):
              uvariants = smart_text(variants, encoding)
          else:
              uvariants = [smart_text(v, encoding) for v in variants]
          res = numeral.choose_plural(amount, uvariants)
      except Exception as err:
          # because filter must die silently
          try:
              default_variant = variants
          except Exception:
              default_variant = ""
          res = default_value % {'error': err, 'value': default_variant}
      return res
docs: Choose proper form for plural.
  
      Value is a amount, parameters are forms of noun.
      Forms are variants for 1, 2, 5 nouns. It may be tuple
      of elements, or string where variants separates each other
      by comma.
  
      Examples::
          {{ some_int|choose_plural:"пример,примера,примеров" }}