def arcs_to_branches(arcs: Iterable[TArc]) -> dict[TLineNo, list[TLineNo]]:
    """Convert a list of arcs into a dict showing branches."""
    arcs_combined = collections.defaultdict(set)
    for fromno, tono in arcs:
        arcs_combined[fromno].add(tono)
    branches = collections.defaultdict(list)
    for fromno, tono in arcs:
        if len(arcs_combined[fromno]) > 1:
            branches[fromno].append(tono)
    return branches
Convert a list of arcs into a dict showing branches.
tests/coveragetest.py