code: def get_pytorch_detr():
      from art.utils import load_dataset
      from art.estimators.object_detection.pytorch_detection_transformer import (
          PyTorchDetectionTransformer,
      )
  
      MEAN = [0.485, 0.456, 0.406]
      STD = [0.229, 0.224, 0.225]
      INPUT_SHAPE = (3, 32, 32)
  
      object_detector = PyTorchDetectionTransformer(
          input_shape=INPUT_SHAPE,
          clip_values=(0, 1),
          preprocessing=(MEAN, STD),
      )
  
      n_test = 2
      (_, _), (x_test, y_test), _, _ = load_dataset("cifar10")
      x_test = x_test.transpose(0, 3, 1, 2).astype(np.float32)
      x_test = x_test[:n_test]
  
      # Create labels
  
      result = object_detector.predict(x=x_test)
  
      y_test = [
          {
              "boxes": result[0]["boxes"],
              "labels": result[0]["labels"],
              "scores": np.ones_like(result[0]["labels"]),
          },
          {
              "boxes": result[1]["boxes"],
              "labels": result[1]["labels"],
              "scores": np.ones_like(result[1]["labels"]),
          },
      ]
  
      yield object_detector, x_test, y_test
  
file_path: adversarial-robustness-toolbox/tests/estimators/object_detection/test_pytorch_detection_transformer.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: get_pytorch_detr() without return types