def METHOD_NAME(
    cls, op: DataFrameGroupByAgg, in_data: pd.DataFrame
) -> Union[pd.DataFrame, pd.Series]:
    # in_data.index.names means MultiIndex (groupby on multi cols)
    index_col = in_data.index.name or in_data.index.names
    res = in_data.reset_index().drop_duplicates().set_index(index_col)
    if op.output_types[0] == OutputType.series:
        res = res.squeeze()
    return res