code: def test_eot_image_rotation_object_detection_pytorch(
      art_warning, fix_get_mnist_subset
  ):
      try:
          x_train_mnist, _, _, _ = fix_get_mnist_subset
  
          x_train_mnist = torch.from_numpy(x_train_mnist[0:2])
  
          y_od = [
              {
                  "boxes": torch.from_numpy(np.array([[1, 1, 3, 3]])),
                  "labels": torch.from_numpy(np.ones((1,))),
                  "scores": torch.from_numpy(np.ones((1,))),
              },
              {
                  "boxes": torch.from_numpy(
                      np.array([[15, 15, 18, 20]])
                  ),
                  "labels": torch.from_numpy(np.ones((1,))),
                  "scores": torch.from_numpy(np.ones((1,))),
              },
          ]
  
          nb_samples = 3
  
          eot = EoTImageRotationPyTorch(
              nb_samples=nb_samples,
              angles=[90.0],
              clip_values=(0.0, 1.0),
              label_type="object_detection",
          )
          x_eot, y_eot = eot.forward(x=x_train_mnist, y=y_od)
  
          assert x_eot.shape[0] == nb_samples * x_train_mnist.shape[0]
  
          x_eot_expected = np.array(
              [
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.07058824,
                  0.99215686,
                  0.99215686,
                  0.99215686,
                  0.8039216,
                  0.3529412,
                  0.74509805,
                  0.99215686,
                  0.94509804,
                  0.31764707,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.5803922,
                  0.99215686,
                  0.99215686,
                  0.7647059,
                  0.04313726,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
              ]
          )
  
          np.testing.assert_almost_equal(
              x_eot.numpy()[0, 0, 14, :], x_eot_expected
          )
          np.testing.assert_almost_equal(
              y_eot[0]["boxes"], np.array([[1, 25, 3, 27]])
          )
          np.testing.assert_almost_equal(
              y_eot[nb_samples]["boxes"], np.array([[15, 10, 20, 13]])
          )
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/preprocessing/expectation_over_transformation/test_image_rotation.py
imports: import logging
  import numpy
  import pytest
  import torch
  from art.preprocessing.expectation_over_transformation.image_rotation.tensorflow import EoTImageRotationTensorFlow
  from art.preprocessing.expectation_over_transformation.image_rotation.pytorch import EoTImageRotationPyTorch
  from tests.utils import ARTTestException
label_desc: Use image node_id 4 for calling a global function with example usage: test_eot_image_rotation_object_detection_pytorch(art_warning, fix_get_mnist_subset) without return types