code: def test_failure_modes(art_warning, image_dl_estimator, params):
      try:
          classifier, _ = image_dl_estimator()
          target = to_categorical([9], 10)[0]
          backdoor = PoisoningAttackBackdoor(add_pattern_bd)
          with pytest.raises(ValueError):
              _ = PoisoningAttackCleanLabelBackdoor(
                  backdoor, classifier, target, **params
              )
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/attacks/poison/test_clean_label_backdoor_attack.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
  from art.attacks.poisoning import PoisoningAttackCleanLabelBackdoor, PoisoningAttackBackdoor
  from art.attacks.poisoning.perturbations import add_pattern_bd
  from art.utils import to_categorical
  from tests.utils import ARTTestException
label_desc: Use image node_id 2 for calling a global function with example usage: test_failure_modes(art_warning, image_dl_estimator, params) without return types