code: def test_backward(self, modeldef, benchmark):
      backward_input = modeldef.forward(*modeldef.inputs)
      if modeldef.backward_setup is not None:
          backward_input = modeldef.backward_setup(backward_input)
  
      if modeldef.backward is not None:
          benchmark(
              cuda_sync,
              modeldef.backward,
              *backward_input,
              retain_graph=True,
          )
  
          with torch.no_grad():
              for param in modeldef.params:
                  assert param.grad is not None
                  param.grad.zero_()
  
file_path: pytorch/benchmarks/fastrnns/test_bench.py
imports: import pytest
  import torch
  from .fuser import set_fuser
  from .runner import get_nn_runners
label_desc: Use image node_id 2 for calling the TestBenchNetwork obj's underlying member method code with example usage: obj.test_backward(modeldef, benchmark) without return types