class_docstr: Implement the JPEG compression defence approach.
  
  For input images or videos with 3 color channels the compression is applied in mode `RGB`
  (3x8-bit pixels, true color), for all other numbers of channels the compression is applied for each channel with
  mode `L` (8-bit pixels, black and white).
  
  | Paper link: https://arxiv.org/abs/1705.02900, https://arxiv.org/abs/1608.00853
  
  
  | Please keep in mind the limitations of defences. For more information on the limitations of this defence,
      see https://arxiv.org/abs/1802.00420 . For details on how to evaluate classifier security in general, see
      https://arxiv.org/abs/1902.06705
code: def _check_params(self) -> None:
      if (
          not isinstance(self.quality, int)
          or self.quality <= 0
          or self.quality > 100
      ):
          raise ValueError(
              "Image quality must be a positive integer <= 100."
          )
  
      if len(self.clip_values) != 2:
          raise ValueError(
              "'clip_values' should be a tuple of 2 floats or arrays containing the allowed data range."
          )
  
      if np.array(self.clip_values[0] >= self.clip_values[1]).any():
          raise ValueError("Invalid 'clip_values': min >= max.")
  
      if self.clip_values[0] != 0:
          raise ValueError("'clip_values' min value must be 0.")
  
      if self.clip_values[1] != 1.0 and self.clip_values[1] != 255:
          raise ValueError(
              "'clip_values' max value must be either 1 or 255."
          )
  
      if not isinstance(self.verbose, bool):
          raise ValueError(
              "The argument `verbose` has to be of type bool."
          )
  
file_path: adversarial-robustness-toolbox/art/defences/preprocessor/jpeg_compression.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from io import BytesIO
  import logging
  from typing import Optional, Tuple, TYPE_CHECKING
  import numpy
  from tqdm.auto import tqdm
  from art.config import ART_NUMPY_DTYPE
  from art.defences.preprocessor.preprocessor import Preprocessor
label_desc: Use image node_id 4 for calling the JpegCompression obj's underlying member method code with example usage: obj._check_params() without return types