Creates a reducer that collects its inputs into a list, optionally grouped into tuples.

ee.Reducer.toList(tupleSize, numOptional)Reducer
tupleSizeInteger, default: null

The size of each output tuple, or null for no grouping. Also determines the number of inputs (null tupleSize has 1 input).

numOptionalInteger, default: 0

The last numOptional inputs will be considered optional; the other inputs must be non-null or the input tuple will be dropped.