code: def make_pytorch_onnx_model(tmpdir):
      input_names = ["x"]
      output_names = ["output1"]
      model_path = os.path.join(tmpdir, "pytorch.onnx")
      torch.onnx.export(
          pytorch_model,
          pytorch_input,
          model_path,
          input_names=input_names,
          output_names=output_names,
          dynamic_axes={
              "x": {0: "batch_size"},  # variable length axes
              "output1": {0: "batch_size"},
          },
      )
      onnx_model = onnx.load(model_path)
      return onnx_model
  
imports: from __future__ import annotations
  import os
  import tempfile
  import typing
  from typing import TYPE_CHECKING
  import numpy
  import onnx
  import onnxruntime
  import sklearn
  import torch
  import torch.nn
  from skl2onnx import convert_sklearn
  from skl2onnx.common.data_types import FloatTensorType
  from skl2onnx.common.data_types import Int64TensorType
  from skl2onnx.common.data_types import StringTensorType
  from sklearn.datasets import load_iris
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import LabelEncoder
  import bentoml
  from .None import FrameworkTestModel
  from .None import FrameworkTestModelConfiguration
  from .None import FrameworkTestModelInput
label_desc: Use image node_id 4 for calling a global function with example usage: make_pytorch_onnx_model(tmpdir) and returns: onnx_model