def _compute_theta(self, norm_batch: np.ndarray, score: np.ndarray, norm_grad: np.ndarray) -> np.ndarray:
        """
        Function to compute the theta at each step.

        :param norm_batch: Norm of a batch.
        :param score: Softmax value at the attacked class.
        :param norm_grad: Norm of gradient values at the attacked class.
        :return: Theta value.
        """
        equ1 = self.eta * norm_batch * norm_grad
        equ2 = score - 1.0 / self.estimator.nb_classes
        result = np.minimum.reduce([equ1, equ2])

        return result

        Function to compute the theta at each step.

        :param norm_batch: Norm of a batch.
        :param score: Softmax value at the attacked class.
        :param norm_grad: Norm of gradient values at the attacked class.
        :return: Theta value.
        
art/attacks/evasion/newtonfool.py