code: def baldwinsoc_winners(self, profile):
          ordering = profile.getOrderVectors()
          m = profile.numCands
          prefcounts = profile.getPreferenceCounts()
          if min(ordering[0]) == 0:
              startstate = set(range(m))
          else:
              startstate = set(range(1, m + 1))
          wmg = self.getWmg2(prefcounts, ordering, startstate, normalize=False)
          known_winners = set()
          hashtable2 = set()
          root = Node(value=startstate)
          stackNode = []
          stackNode.append(root)
          while stackNode:
              node = stackNode.pop()
              state = node.value.copy()
              if len(state) == 1 and list(state)[0] not in known_winners:
                  known_winners.add(list(state)[0])
                  continue
              if state <= known_winners:
                  continue
              plural_score = dict()
              for cand in state:
                  plural_score[cand] = 0
              for cand1, cand2 in itertools.permutations(state, 2):
                  plural_score[cand1] += wmg[cand1][cand2]
              minscore = min(plural_score.values())
              for to_be_deleted in state:
                  if plural_score[to_be_deleted] == minscore:
                      child_state = state.copy()
                      child_state.remove(to_be_deleted)
                      tpc = tuple(sorted(child_state))
                      if tpc in hashtable2:
                          continue
                      else:
                          hashtable2.add(tpc)
                          child_node = Node(value=child_state)
                          stackNode.append(child_node)
          return sorted(known_winners)