code: def test_output_grad(
      tmpdir, model, x, train, disable_experimental_warning
  ):
      path = str(tmpdir)
      export_testcase(model, (x,), path, output_grad=True, train=train)
  
      model_filename = os.path.join(path, "model.onnx")
      assert os.path.isfile(model_filename)
      assert os.path.isfile(
          os.path.join(path, "test_data_set_0", "input_0.pb")
      )
      assert os.path.isfile(
          os.path.join(path, "test_data_set_0", "output_0.pb")
      )
  
      onnx_model = onnx.load(model_filename)
      initializer_names = {i.name for i in onnx_model.graph.initializer}
  
      # 10 gradient files should be there
      for i in range(12):
          tensor_filename = os.path.join(
              path, "test_data_set_0", "gradient_{}.pb".format(i)
          )
          assert os.path.isfile(tensor_filename)
          tensor = onnx.load_tensor(tensor_filename)
          assert tensor.name.startswith("param_")
          assert tensor.name in initializer_names
      assert not os.path.isfile(
          os.path.join(path, "test_data_set_0", "gradient_12.pb")
      )
  
file_path: chainer/tests/onnx_chainer_tests/test_export_testcase.py
imports: import os
  import chainer
  import chainer.functions
  import chainer.links
  import numpy
  import onnx
  import pytest
  from onnx_chainer import export_testcase
  from onnx_chainer import export
label_desc: Use image node_id 4 for calling a global function with example usage: test_output_grad(tmpdir, model, x, train, disable_experimental_warning) without return types