code: def test_predict(get_pytorch_detr):
      object_detector, x_test, _ = get_pytorch_detr
  
      result = object_detector.predict(x=x_test)
  
      assert list(result[0].keys()) == ["boxes", "labels", "scores"]
  
      assert result[0]["boxes"].shape == (100, 4)
      expected_detection_boxes = np.asarray(
          [-5.9490204e-03, 1.1947733e01, 3.1993944e01, 3.1925127e01]
      )
      np.testing.assert_array_almost_equal(
          result[0]["boxes"][2, :], expected_detection_boxes, decimal=1
      )
  
      assert result[0]["scores"].shape == (100,)
      expected_detection_scores = np.asarray(
          [
              0.00679839,
              0.0250559,
              0.07205943,
              0.01115368,
              0.03321039,
              0.10407761,
              0.00113309,
              0.01442852,
              0.00527624,
              0.01240906,
          ]
      )
      np.testing.assert_array_almost_equal(
          result[0]["scores"][:10], expected_detection_scores, decimal=1
      )
  
      assert result[0]["labels"].shape == (100,)
      expected_detection_classes = np.asarray(
          [17, 17, 33, 17, 17, 17, 74, 17, 17, 17]
      )
      np.testing.assert_array_almost_equal(
          result[0]["labels"][:10],
          expected_detection_classes,
          decimal=5,
      )
  
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 2 for calling a global function with example usage: test_predict(get_pytorch_detr) without return types