def __call__(self, x: np.ndarray, y: np.ndarray | None = None) -> tuple[np.ndarray, np.ndarray | None]:
        """
        Apply preprocessing to input `x` and labels `y`.

        :param x: Sample to smooth with shape `(batch_size, width, height, depth)`.
        :param y: Labels of the sample `x`. This function does not affect them in any way.
        :return: Smoothed sample.
        """
        import tensorflow as tf

        x_tensor = tf.convert_to_tensor(x)
        if y is not None:
            y = tf.convert_to_tensor(y)

        x_tensor, y = self.forward(x_tensor, y)

        x_result = x_tensor.numpy()
        if y is not None:
            y = y.numpy()
        return x_result, y

        Apply preprocessing to input `x` and labels `y`.

        :param x: Sample to smooth with shape `(batch_size, width, height, depth)`.
        :param y: Labels of the sample `x`. This function does not affect them in any way.
        :return: Smoothed sample.
        
art/defences/preprocessor/preprocessor.py