reduceby docstring explanation