class_docstr: Test the ImperceptibleASR attack.
class_docstr_tok: ["Test","the","ImperceptibleASR","attack","."]
code: def test_generate_batch(
      self, art_warning, mocker, asr_dummy_estimator, audio_data
  ):
      try:
          test_input, test_target = audio_data
  
          # mock _create_adversarial and test if result gets passed unchanged through _create_imperceptible
          mocker.patch.object(
              CarliniWagnerASR,
              "_create_adversarial",
              return_value=test_input,
          )
  
          carlini_asr = CarliniWagnerASR(
              estimator=asr_dummy_estimator()
          )
          adversarial = carlini_asr._generate_batch(
              test_input, test_target
          )
  
          carlini_asr._create_adversarial.assert_called()
          for a, t in zip(adversarial, test_input):
              assert_array_equal(a, t)
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/attacks/evasion/test_adversarial_asr.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import pytest
  from numpy.testing import assert_array_equal
  from art.attacks.attack import EvasionAttack
  from art.attacks.evasion.adversarial_asr import CarliniWagnerASR
  from art.attacks.evasion.imperceptible_asr.imperceptible_asr import ImperceptibleASR
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin, NeuralNetworkMixin
  from art.estimators.speech_recognition.speech_recognizer import SpeechRecognizerMixin
  from tests.attacks.utils import backend_test_classifier_type_check_fail
  from tests.utils import ARTTestException
label_desc: Use image node_id 4 for calling the TestImperceptibleASR obj's underlying member method code with example usage: obj.test_generate_batch(art_warning, mocker, asr_dummy_estimator, audio_data) without return types