def forward_step(self, poison: np.ndarray) -> np.ndarray:
        """
        Forward part of forward-backward splitting algorithm.

        :param poison: the current poison samples.
        :return: poison example closer in feature representation to target space.
        """
        if isinstance(self.estimator, KerasClassifier):
            (attack_grad,) = self.estimator.custom_loss_gradient(
                self.attack_loss,
                [self.poison_placeholder, self.target_placeholder],
                [poison, self.target],
                name="feature_collision_" + str(self.feature_layer),
            )
        elif isinstance(self.estimator, PyTorchClassifier):
            attack_grad = self.estimator.custom_loss_gradient(self.attack_loss, poison, self.target, self.feature_layer)
        else:
            raise ValueError("The type of the estimator is not supported.")

        poison -= self.learning_rate * attack_grad[0]

        return poison

        Forward part of forward-backward splitting algorithm.

        :param poison: the current poison samples.
        :return: poison example closer in feature representation to target space.
        
art/attacks/poisoning/feature_collision_attack.py