docstr: Internal function to build a ortsess.
  
  :param sess_options: ortsess options in ort.SessionOptions type
docstr_tok: ["Internal","function","to","build","a","ortsess",".",":","param","sess_options",":","ortsess","options","in","ort.SessionOptions","type"]
code: def _build_ortsess(self, sess_options=None):
      """
      Internal function to build a ortsess.
  
      :param sess_options: ortsess options in ort.SessionOptions type
      """
      onnx_path_or_bytes = self.onnx_filepath
      if isinstance(self.onnx_filepath, str):
          self.onnx_model = onnx.load(self.onnx_filepath)
      elif isinstance(self.onnx_filepath, bytes):
          self.onnx_model = onnx.load_model_from_string(
              self.onnx_filepath
          )
      else:
          invalidInputError(
              isinstance(self.onnx_filepath, onnx.ModelProto),
              errMsg="Model type {} is not a legal ONNX model.".format(
                  type(self.onnx_filepath)
              ),
          )
          self.onnx_model = self.onnx_filepath
          onnx_path_or_bytes = self.onnx_filepath.SerializeToString()
      self.ortsess = ort.InferenceSession(
          onnx_path_or_bytes, sess_options=sess_options
      )
      self._forward_args = list(
          map(lambda x: x.name, self.ortsess.get_inputs())
      )
  
file_path: BigDL/python/nano/src/bigdl/nano/deps/onnxruntime/core/onnxruntime_model.py
imports: from pathlib import Path
  import onnxruntime
  import onnx
  from bigdl.nano.utils.common import invalidInputError, _flatten
  import numpy
label_desc: Use image node_id 4 for calling the ONNXRuntimeModel obj's underlying member method code with example usage: obj._build_ortsess(sess_options) without return types