def _local_decode(self):
        """
        Finds the index of the maximum values for all the single node dual objectives.

        Reference:
        code presented by Sontag in 2012 here: http://cs.nyu.edu/~dsontag/code/README_v2.html
        """
        # The current assignment of the single node factors is stored in the form of a dictionary
        decoded_result_assignment = {node: np.argmax(self.objective[node].values)
                                     for node in self.objective if len(node) == 1}
        # Use the original cluster_potentials of each factor to find the primal integral value.
        # 1. For single node factors
        integer_value = sum([self.factors[variable][0].values[decoded_result_assignment[frozenset([variable])]]
                             for variable in self.variables])
        # 2. For clusters
        for cluster_key in self.cluster_set:
            cluster = self.cluster_set[cluster_key]
            index = [tuple([variable, decoded_result_assignment[frozenset([variable])]])
                     for variable in cluster.cluster_variables]
            integer_value += cluster.cluster_potential.reduce(index, inplace=False).values

        # Check if this is the best assignment till now
        if self.best_int_objective < integer_value:
            self.best_int_objective = integer_value
            self.best_assignment = decoded_result_assignment
Finds the index of the maximum values for all the single node dual objectives.

        Reference:
        code presented by Sontag in 2012 here: http://cs.nyu.edu/~dsontag/code/README_v2.html