def retrieve_sheriff_reals()

in mozci/console/commands/push.py [0:0]


def retrieve_sheriff_reals(pushes_group_summaries, push):
    # Compare real failures that were predicted by mozci with the ones classified by Sheriffs
    sheriff_reals = set()
    # Get likely regressions of this push
    likely_regressions = push.get_likely_regressions("group", True)
    # Only consider groups that were classified as "fixed by commit" to exclude likely regressions mozci found via heuristics.
    max_depth = None if push.backedout or push.bustage_fixed_by else MAX_DEPTH
    for other in push._iterate_children(max_depth=max_depth):
        if other.push_uuid not in pushes_group_summaries:
            pushes_group_summaries[other.push_uuid] = other.group_summaries

        for name, group in pushes_group_summaries[other.push_uuid].items():
            classifications = set([c for c, _ in group.classifications])
            if classifications == {"fixed by commit"} and name in likely_regressions:
                sheriff_reals.add(name)

    return pushes_group_summaries, sheriff_reals