def METHOD_NAME(op, data, where, aggcontext=None, **kwargs):
    return aggcontext.agg(
        (
            data.obj.loc[where].groupby(data.grouping.grouper)
            if where is not None
            else data
        ),
        np.array,
    )