code: def test_errors(art_warning):
      try:
          from pytorchyolo import models
  
          from art.estimators.object_detection.pytorch_yolo import (
              PyTorchYolo,
          )
  
          model_path = "/tmp/PyTorch-YOLOv3/config/yolov3.cfg"
          weights_path = "/tmp/PyTorch-YOLOv3/weights/yolov3.weights"
          model = models.load_model(
              model_path=model_path, weights_path=weights_path
          )
  
          with pytest.raises(ValueError):
              PyTorchYolo(
                  model=model,
                  clip_values=(1, 2),
                  attack_losses=(
                      "loss_classifier",
                      "loss_box_reg",
                      "loss_objectness",
                      "loss_rpn_box_reg",
                  ),
              )
  
          with pytest.raises(ValueError):
              PyTorchYolo(
                  model=model,
                  clip_values=(-1, 1),
                  attack_losses=(
                      "loss_classifier",
                      "loss_box_reg",
                      "loss_objectness",
                      "loss_rpn_box_reg",
                  ),
              )
  
          from art.defences.postprocessor.rounded import Rounded
  
          post_def = Rounded()
          with pytest.raises(ValueError):
              PyTorchYolo(
                  model=model,
                  clip_values=(0, 1),
                  attack_losses=(
                      "loss_classifier",
                      "loss_box_reg",
                      "loss_objectness",
                      "loss_rpn_box_reg",
                  ),
                  postprocessing_defences=post_def,
              )
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/estimators/object_detection/test_pytorch_yolo.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
  from tests.utils import ARTTestException
label_desc: Use image node_id 4 for calling a global function with example usage: test_errors(art_warning) without return types