Returns a number or a list that associates the winner(s) of a profile under black rule.

        :ivar Profile profile: A Profile object that represents an election profile.

def black_winner(self, profile):
        """
        Returns a number or a list that associates the winner(s) of a profile under black rule.

        :ivar Profile profile: A Profile object that represents an election profile.
        """

        # Currently, we expect the profile to contain complete ordering over candidates. Ties are
        # allowed however.
        elecType = profile.getElecType()
        if elecType != "soc" and elecType != "toc" and elecType != "csv":
            print("ERROR: unsupported election type")
            exit()

        wmg = profile.getWmg()
        m = profile.numCands
        for cand1 in wmg.keys():
            outgoing = 0
            for cand2 in wmg[cand1].keys():
                if wmg[cand1][cand2] > 0:
                    outgoing += 1
            if outgoing == m - 1:
                return [cand1]

        Borda_winner = MechanismBorda().getWinners(profile)
        return Borda_winner