One of the possible fixes:
def label_group(self, value):
if TYPES.HISTOGRAM_BUCKET == value[0][0]:
return [x for x in value[0][3] if x[0] != 'bucket']
return value[0][3]
Other could be sorting bucket always first I guess, took me a while to find at least this fix.