code: def create_sum(self, bound=1):
          
  
          if self.solver != 'mc':  # standard totalizer-based encoding
              # new totalizer sum
              t = ITotalizer(lits=self.rels, ubound=bound, top_id=self.topv)
  
              # updating top variable id
              self.topv = t.top_id
  
              # adding its clauses to oracle
              for cl in t.cnf.clauses:
                  self.oracle.add_clause(cl)
          else:
              # for minicard, use native cardinality constraints instead of the
              # standard totalizer, i.e. create a new (empty) totalizer sum and
              # fill it with the necessary data supported by minicard
              t = ITotalizer()
              t.lits = self.rels
  
              self.topv += 1  # a new variable will represent the bound
  
              # proper initial bound
              t.rhs = [None] * (len(t.lits))
              t.rhs[bound] = self.topv
  
              # new atmostb constraint instrumented with
              # an implication and represented natively
              rhs = len(t.lits)
              amb = [[-self.topv] * (rhs - bound) + t.lits, rhs]
  
              # add constraint to the solver
              self.oracle.add_atmost(*amb)
  
          return t
docs: Create a totalizer object encoding a cardinality
              constraint on the new list of relaxation literals obtained
              in :func:`process_sels` and :func:`process_sums`. The
              clauses encoding the sum of the relaxation literals are
              added to the SAT oracle. The sum of the totalizer object
              is encoded up to the value of the input parameter
              ``bound``, which is set to ``1`` by default.
  
              :param bound: right-hand side for the sum to be created
              :type bound: int
  
              :rtype: :class:`.ITotalizer`
  
              Note that if Minicard is used as a SAT oracle, native
              cardinality constraints are used instead of
              :class:`.ITotalizer`.