def compute_group_weights(group_indices, sample_weight):
    divided_weight = compute_divided_weight(group_indices, sample_weight=sample_weight)
    result = numpy.zeros(len(group_indices))
    for i, group in enumerate(group_indices):
        result[i] = numpy.sum(divided_weight[group])
    return result / numpy.sum(result)
Iterate over field errors and parse into dicts
dataset/ETHPy150Open anaderi/lhcb_trigger_ml/hep_ml/metrics_utils.py/compute_group_weights--crossover with--dataset/ETHPy150Open MediaMath/t1-python/terminalone/xmlparser.py/XMLParser._parse_field_error