def _get_attack(self, a_name: str, params: dict[str, Any] | None = None) -> EvasionAttack:
        """
        Get an attack object from its name.

        :param a_name: attack name.
        :param params: attack params.
        :return: attack object
        """
        try:
            attack_class = self._get_class(self.attacks_dict[a_name])
            a_instance = attack_class(self.estimator)  # type: ignore

            if params:
                a_instance.set_params(**params)

            return a_instance

        except KeyError:
            raise NotImplementedError(f"{a_name} attack not supported") from KeyError

        Get an attack object from its name.

        :param a_name: attack name.
        :param params: attack params.
        :return: attack object
        
art/attacks/evasion/targeted_universal_perturbation.py