def __init__(
        self,
        sr_original: int,
        sr_new: int,
        channels_first: bool = False,
        apply_fit: bool = False,
        apply_predict: bool = True,
    ):
        """
        Create an instance of the resample preprocessor.

        :param sr_original: Original sampling rate of sample.
        :param sr_new: New sampling rate of sample.
        :param channels_first: Set channels first or last.
        :param apply_fit: True if applied during fitting/training.
        :param apply_predict: True if applied during predicting.
        """
        super().__init__(is_fitted=True, apply_fit=apply_fit, apply_predict=apply_predict)
        self.sr_original = sr_original
        self.sr_new = sr_new
        self.channels_first = channels_first
        self._check_params()

        Create an instance of the resample preprocessor.

        :param sr_original: Original sampling rate of sample.
        :param sr_new: New sampling rate of sample.
        :param channels_first: Set channels first or last.
        :param apply_fit: True if applied during fitting/training.
        :param apply_predict: True if applied during predicting.
        
art/defences/preprocessor/resample.py