def REDUCE(_input, initial_value, _in):
return {'<STR_LIT>': {'<STR_LIT:input>': _input, '<STR_LIT>': initial_value, '<STR_LIT>': _in}}<EOL>
Applies an expression to each element in an array and combines them into a single value.
See https://docs.mongodb.com/manual/reference/operator/aggregation/reduce/
for more details
:param _input: Can be any valid expression that resolves to an array.
:param initial_value: The initial cumulative value set before in is applied to the first element of the input array.
:param _in: A valid expression that reduce applies to each element in the input array in left-to-right order.
:return: Aggregation operator