docs: def _get_model_cost(self, formula, model):
          """
              Given a WCNF formula and a model, the method computes the MaxSAT
              cost of the model, i.e. the sum of weights of soft clauses that are
              unsatisfied by the model.
  
              :param formula: an input MaxSAT formula
              :param model: a satisfying assignment
  
              :type formula: :class:`.WCNF`
              :type model: list(int)
  
              :rtype: int
          """
  
          model_set = set(model)
          cost = 0
  
          for i, cl in enumerate(formula.soft):
              cost += formula.wght[i] if all(l not in model_set for l in filter(lambda l: abs(l) <= self.formula.nv, cl)) else 0
  
          return cost