def _normalize(x: np.ndarray) -> np.ndarray:
        """
        Apply L_2 batch normalization on `x`.

        :param x: The input array batch to normalize.
        :return: The normalized version of `x`.
        """
        norm = np.atleast_1d(np.linalg.norm(x, axis=1))
        norm[norm == 0] = 1
        normalized_x = x / np.expand_dims(norm, axis=1)

        return normalized_x

        Apply L_2 batch normalization on `x`.

        :param x: The input array batch to normalize.
        :return: The normalized version of `x`.
        
art/attacks/evasion/virtual_adversarial.py