code: def test_check_params(art_warning, fix_get_rcnn):
      try:
          frcnn = fix_get_rcnn
  
          # with pytest.raises(TypeError):
          #     _ = RobustDPatch(frcnn, patch_shape=(1.0, 2.0, 3.0))
          # with pytest.raises(ValueError):
          #     _ = RobustDPatch(frcnn, patch_shape=(1, 2, 3, 4))
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, learning_rate=1)
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, learning_rate=-1.0)
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, max_iter=1.0)
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, max_iter=-1)
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, batch_size=1.0)
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, batch_size=-1)
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, verbose="true")
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, patch_location="true")
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, patch_location=(1, 2, 3))
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, crop_range="true")
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, crop_range=(1, 2, 3))
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, crop_range=(2, 1))
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(
                  frcnn, patch_location=(0, 1), crop_range=(1, 2)
              )
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, brightness_range=(1, 2, 3))
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, brightness_range=(1.0, 2.0, 3.0))
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, brightness_range=(-1.0, 1.0))
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, brightness_range=(2.0, 1.0))
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, rotation_weights=("1", "2", "3"))
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, rotation_weights=(1, 2, 3))
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, rotation_weights=(-1, -2, -3, -4))
          with pytest.raises(ValueError):
              _ = RobustDPatch(
                  frcnn, rotation_weights=(0.0, 0.0, 0.0, 0.0)
              )
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, sample_size=1.0)
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, sample_size=-1)
  
          with pytest.raises(ValueError):
              _ = RobustDPatch(frcnn, targeted="true")
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/attacks/evasion/test_dpatch_robust.py
imports: import logging
  import numpy
  import pytest
  from art.attacks.evasion import RobustDPatch
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.estimators.object_detection.object_detector import ObjectDetectorMixin
  from tests.attacks.utils import backend_test_classifier_type_check_fail
  from tests.utils import ARTTestException
label_desc: Use image node_id 7 for calling a global function with example usage: test_check_params(art_warning, fix_get_rcnn) without return types