parameters: (value)
docstring: Reverse the object or return an iterator that iterates over it the other
      way round.
docstring_summary: Reverse the object or return an iterator that iterates over it the other
      way round.
docstring_tokens: Reverse the object or return an iterator that iterates over it the other way round .
function: def do_reverse(value):
      """Reverse the object or return an iterator that iterates over it the other
      way round.
      """
      if isinstance(value, string_types):
          return value[::-1]
      try:
          return reversed(value)
      except TypeError:
          try:
              rv = list(value)
              rv.reverse()
              return rv
          except TypeError:
              raise FilterArgumentError('argument must be iterable')
function_tokens: def do_reverse ( value ) : if isinstance ( value , string_types ) : return value [ : : - 1 ] try : return reversed ( value ) except TypeError : try : rv = list ( value ) rv . reverse ( ) return rv except TypeError : raise FilterArgumentError ( 'argument must be iterable' )