class_docstr: Implement the MP3 compression defense approach.
docstr: Create an instance of MP3 compression.
  
  :param sample_rate: Specifies the 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.
  :param verbose: Show progress bars.
code: def __init__(
      self,
      sample_rate: int,
      channels_first: bool = False,
      apply_fit: bool = False,
      apply_predict: bool = True,
      verbose: bool = False,
  ) -> None:
      """
      Create an instance of MP3 compression.
  
      :param sample_rate: Specifies the 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.
      :param verbose: Show progress bars.
      """
      super().__init__(
          is_fitted=True,
          apply_fit=apply_fit,
          apply_predict=apply_predict,
      )
      self.channels_first = channels_first
      self.sample_rate = sample_rate
      self.verbose = verbose
      self._check_params()
  
file_path: adversarial-robustness-toolbox/art/defences/preprocessor/mp3_compression.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from io import BytesIO
  from typing import Optional, Tuple
  import numpy
  from tqdm.auto import tqdm
  from art.defences.preprocessor.preprocessor import Preprocessor
label_desc: Use image node_id 1 to create a new Mp3Compression object from inherited base classes: Preprocessor with example: obj = Mp3Compression(sample_rate, channels_first, apply_fit, apply_predict, verbose)