docs: def _update_triangles(self, triangles_list):
          """
          From a set of variables forming a triangle in the model, we form the corresponding Clusters.
          These clusters are then appended to the code.
  
          Parameters
          ----------
          triangle_list : list
                          The list of variables forming the triangles to be updated. It is of the form of
                          [['var_5', 'var_8', 'var_7'], ['var_4', 'var_5', 'var_7']]
  
          """
          new_intersection_set = []
          for triangle_vars in triangles_list:
              cardinalities = [self.cardinality[variable] for variable in triangle_vars]
              current_intersection_set = [frozenset(intersect) for intersect in it.combinations(triangle_vars, 2)]
              current_factor = DiscreteFactor(triangle_vars, cardinalities, np.zeros(np.prod(cardinalities)))
              self.cluster_set[frozenset(triangle_vars)] = self.Cluster(current_intersection_set, current_factor)
              # add new factors
              self.model.factors.append(current_factor)
              # add new intersection sets
              new_intersection_set.extend(current_intersection_set)
              # add new factors in objective
              self.objective[frozenset(triangle_vars)] = current_factor