def METHOD_NAME(
        signedResults: Dict[Staker, SignedResult],
        groupInfo:     CandidateGroup
) -> Optional[ResultSubmission]:
    # for each result, list its supporters and their signatures
    preferredResults: Dict[Result, StakerSignature] = {}
    for (staker, signedResult) in signedResults:
        result = signedResult.result
        signature = signedResult.signature
        if result in preferredResults:
            preferredResults[result].append((staker, signature))
        else:
            preferredResults[result] = [(staker, signature)]
    # for each result, counts how many members support it
    orderedResults: Dict[Result int] = {}
    for (result, supporters) in preferredResults:
        orderedResults[result] = len(supporters)
    leadingResult = keyByMaxValue(orderedResults)
    participantPlurality = preferredResults[leadingResult]
    if len(participantPlurality) < groupInfo.minH:
        return None
    else:
        participants = groupInfo.members
        # set up the bit array showing who signed the result
        submissionSigners = [False] * len(participants)
        submissionSignatures = []
        # for each supporter of the plurality resul, set their index in the
        # signers array to True and add their signature to the group signature
        for (signer, signature) in participantPlurality:
            submissionSigners[participants.index(signer)] = True
            submissionSignatures.append(signature)
        groupSignature = reduce(Bn256.ecadd, submissionSignatures)
        return ResultSubmission(
            leadingResult,
            groupSignature,
            submissionSigners
        )