def METHOD_NAME(self, groups, numbers, key):
    dff = gramex.ml.groupmeans(self.df, groups, numbers)
    result = {} if dff.empty else json.loads(dff.iloc[0].to_json(double_precision=4))
    self.assertDictEqual(result, self.results[key], f'Failed: {key}')