code: def test_jpeg_compression_image_data(
      art_warning, image_batch, channels_first, framework
  ):
      try:
          test_input, test_output = image_batch
          jpeg_compression = JpegCompression(
              clip_values=(0, 255), channels_first=channels_first
          )
  
          assert_array_equal(
              jpeg_compression(test_input)[0], test_output
          )
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/defences/preprocessor/test_jpeg_compression.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from art.config import ART_NUMPY_DTYPE
  from art.defences.preprocessor import JpegCompression
  from tests.utils import ARTTestException
label_desc: Use image node_id 3 for calling a global function with example usage: test_jpeg_compression_image_data(art_warning, image_batch, channels_first, framework) without return types