code: def test_get_loss_gradients(art_warning):
      try:
          x_train = np.ones((2, 12, 299, 299, 3)).astype(np.float32)
          y_train = np.zeros((2, 101))
          y_train[:, 1] = 1
  
          model = Model()
          classifier = PyTorchClassifier(
              model=model,
              loss=None,
              input_shape=x_train.shape[1:],
              nb_classes=y_train.shape[1],
          )
          attack = OverTheAirFlickeringPyTorch(
              classifier=classifier, verbose=False
          )
  
          gradients = attack._get_loss_gradients(
              x=torch.from_numpy(x_train),
              y=torch.from_numpy(y_train),
              perturbation=torch.zeros(x_train.shape),
          )
  
          assert gradients.shape == (2, 12, 1, 1, 3)
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/attacks/evasion/test_over_the_air.py
imports: import logging
  import numpy
  import pytest
  import torch
  from art.attacks.evasion.over_the_air_flickering.over_the_air_flickering_pytorch import OverTheAirFlickeringPyTorch
  from art.estimators.classification import PyTorchClassifier
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from tests.attacks.utils import backend_test_classifier_type_check_fail
  from tests.utils import ARTTestException
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_loss_gradients(art_warning) without return types