code: def test_convert_to_onnx():
      model = ToyModel()
      dummy_input = torch.randn(1, 1)
      model_path = "linear.onnx"
      # set the model to inference mode
      model.eval()
  
      # Let's create a dummy input tensor
  
      # Export the model
      torch.onnx.export(
          model,  # model being run
          dummy_input,  # model input (or a tuple for multiple inputs)
          model_path,  # where to save the model
          export_params=True,  # store the trained parameter weights inside the model file
          opset_version=10,  # the ONNX version to export the model to
          do_constant_folding=True,  # whether to execute constant folding for optimization
          input_names=["modelInput"],  # the model's input names
          output_names=["modelOutput"],  # the model's output names
          dynamic_axes={
              "modelInput": {0: "batch_size"},  # variable length axes
              "modelOutput": {0: "batch_size"},
          },
      )
  
file_path: serve/test/pytest/test_onnx.py
imports: import subprocess
  import torch
  import torch.onnx
label_desc: Use image node_id 1 for calling a global function with example usage: test_convert_to_onnx() without return types