<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sum(self, values, axis=0, dtype=None):
 """compute the sum over each group Parameters values to sum per group axis : int, optional alternative reduction axis for values dtype : output dtype Returns ------- unique: ndarray, [groups] unique keys value array, reduced over groups """

        values = np.asarray(values)
        return self.unique, self.reduce(values, axis=axis, dtype=dtype)