def bin_to_group_indices(bin_indices, mask):
    assert len(bin_indices) == len(mask), "Different length"
    bins_id = numpy.unique(bin_indices)
    result = list()
    for bin_id in bins_id:
        result.append(numpy.where(mask & (bin_indices == bin_id))[0])
    return result


# endregion


# region Supplementary uniformity-related functions (to measure flatness of predictions)
Returns a dictionary of the parsed <Value>On/Off methods
dataset/ETHPy150Open anaderi/lhcb_trigger_ml/hep_ml/metrics_utils.py/bin_to_group_indices--crossover with--dataset/ETHPy150Open VisTrails/VisTrails/contrib/titan/vtk_parser.py/VTKMethodParser.get_toggle_methods