code: def PytorchONNXRuntimeModel(
      model,
      input_sample=None,
      onnxruntime_session_options=None,
      simplification=True,
      dynamic_axes=True,
      output_tensors=True,
      **export_kwargs,
  ):
      """
      Create a ONNX Runtime model from pytorch.
  
      :param model: 1. Pytorch model to be converted to ONNXRuntime for inference.
                    2. Path to ONNXRuntime saved model.
      :param input_sample: A set of inputs for trace, defaults to None if you have trace before or
                           model is a LightningModule with any dataloader attached,
                           defaults to None.
      :param onnxruntime_session_options: A session option for onnxruntime accelerator.
      :param simplification: whether we use onnxsim to simplify the ONNX model, only valid when
                             accelerator='onnxruntime', otherwise will be ignored. If this option
                             is set to True, new dependency 'onnxsim' need to be installed.
      :param dynamic_axes: dict or boolean, default to True. By default the exported onnx model
                           will have the first dim of each Tensor input as a dynamic batch_size.
                           If dynamic_axes=False, the exported model will have the shapes of all
                           input and output tensors set to exactly match those given in
                           input_sample. To specify axes of tensors as dynamic (i.e. known only
                           at run-time), set dynamic_axes to a dict with schema:
  
                           | KEY (str): an input or output name. Each name must also be provided
                           | in input_names or output_names.
                           |
                           | VALUE (dict or list): If a dict, keys are axis indices and values
                           | are axis names. If a list, each element is an axis index.
  
                           If accelerator != 'openvino'/'onnxruntime', it will be ignored.
      :param output_tensors: boolean, default to True and output of the model will be Tensors.
                             If output_tensors=False, output of the ONNX model will be ndarray.
      :param **export_kwargs: will be passed to torch.onnx.export function.
      :return: A PytorchONNXRuntimeModel instance
      """
      from .pytorch.pytorch_onnxruntime_model import (
          PytorchONNXRuntimeModel,
      )
  
      return PytorchONNXRuntimeModel(
          model,
          input_sample,
          onnxruntime_session_options=onnxruntime_session_options,
          simplification=simplification,
          dynamic_axes=dynamic_axes,
          output_tensors=output_tensors,
          **export_kwargs,
      )
  
imports: from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 1 for calling a global function with example usage: PytorchONNXRuntimeModel(model, input_sample, onnxruntime_session_options, simplification, dynamic_axes, output_tensors) and returns: PytorchONNXRuntimeModel