code: def test_zero_out_gradients(mocker, model):
      backprop = Backprop(model)
      mocker.spy(model, "zero_grad")
  
      target_class = 5
      input_ = torch.zeros([1, 3, 224, 224])
  
      make_mock_output(mocker, model, target_class)
  
      backprop.calculate_gradients(input_, target_class)
  
      model.zero_grad.assert_called_once()
  
imports: import inspect
  import pytest
  import torch
  import torch.nn
  import torch.nn.functional
  import torchvision.models
  from flashtorch.saliency import Backprop
label_desc: Use image node_id 8 for calling a global function with example usage: test_zero_out_gradients(mocker, model) without return types