code: def convert_tf_to_onnx(
      model: Union[tf.Module, tf.keras.Model],
      model_params: ModelParams,
      output_file_path: Union[str, Path],
  ):
      """Convert TF models into ONNX.
  
      Args:
          model (Union[tf.Module, tf.keras.Model]): TF model.
          model_params (ModelParams): Info about model parameters.
          output_file_path (Path): Path where storing the output file.
      """
  
      try:
          if isinstance(model, tf.keras.Model) or (
              isinstance(model, TensorFlowTransformerWrapper)
              and isinstance(model.core_model, tf.keras.Model)
          ):
              return convert_keras_to_onnx(
                  model, model_params, output_file_path
              )
          else:
              return convert_tf_saved_model_to_onnx(
                  model, output_file_path
              )
      except Exception:
          logger.warning(
              "Something went wrong during conversion from tensorflow"
              " to onnx model. ONNX pipeline will be unavailable."
          )
          return None
  
file_path: nebuly/optimization/nebullvm/nebullvm/operations/conversions/tensorflow.py
imports: import subprocess
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Union
  from loguru import logger
  from nebullvm.config import ONNX_OPSET_VERSION
  from nebullvm.core.models import ModelParams
  from nebullvm.optional_modules.tensorflow import tensorflow, tf2onnx
  from nebullvm.optional_modules.onnx import onnx
  from nebullvm.tools.huggingface import TensorFlowTransformerWrapper
label_desc: Use image node_id 1 for calling a global function with example usage: convert_tf_to_onnx(model, model_params, output_file_path) and returns: convert_keras_to_onnx, convert_tf_saved_model_to_onnx, None