code: def convert_onnx_to_xml(
      onnx_file_path,
      xml_path,
      precision,
      logging=True,
      batch_size=1,
      **kwargs,
  ):
      xml_path = Path(xml_path)
      model_name, output_dir = str(xml_path.stem), str(xml_path.parent)
      if OpenVINO_2023:
          precision_str = (
              "--compress_to_fp16" if precision == "fp16" else ""
          )
      else:
          precision_str = (
              "--data_type FP16" if precision == "fp16" else ""
          )
      params_str = ""
      for key, value in kwargs.items():
          value = str(value)
          value = value.replace(" ", "")  # remove space in param value
          params_str += "--" + str(key) + " " + str(value) + " "
      if OpenVINO_LESS_2022_3:
          logging_str = "--silent" if logging is False else ""
          mo_cmd = "mo -m {0} {1} {2} {3} -n {4} -o {5}".format(
              str(onnx_file_path),
              logging_str,
              precision_str,
              params_str,
              model_name,
              output_dir,
          )
      else:
          mo_cmd = (
              "mo -m {0} --silent {1} {2} {3} -n {4} -o {5}".format(
                  str(onnx_file_path),
                  not logging,
                  precision_str,
                  params_str,
                  model_name,
                  output_dir,
              )
          )
  
      p = subprocess.Popen(mo_cmd.split())
      p.communicate()
      invalidInputError(
          not p.returncode,
          "ModelOptimizer fails to convert {}.".format(
              str(onnx_file_path)
          ),
      )
  
file_path: BigDL/python/nano/src/bigdl/nano/deps/openvino/core/utils.py
imports: import subprocess
  import operator
  from pathlib import Path
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.utils.common import compare_version
  from openvino.runtime.passes import Manager
label_desc: Use image node_id 1 for calling a global function with example usage: convert_onnx_to_xml(onnx_file_path, xml_path, precision, logging, batch_size) without return types