code: def export_tensorflow(
      model: "TFPreTrainedModel",
      config: OnnxConfig,
      opset: int,
      output: Path,
  ) -> Tuple[List[str], List[str]]:
      """
      Exports a TensorFlow model to an ONNX Intermediate Representation.
  
      Args:
          model ([`TFPreTrainedModel`]):
              The model to export.
          config ([`~exporters.onnx.config.OnnxConfig`]):
              The ONNX configuration associated with the exported model.
          opset (`int`):
              The version of the ONNX operator set to use.
          output (`Path`):
              Directory to store the exported ONNX model.
          device (`Optional[str]`, defaults to `"cpu"`):
              The device on which the ONNX model will be exported. Either `cpu` or `cuda`. Only PyTorch is supported for
              export on CUDA devices.
  
      Returns:
          `Tuple[List[str], List[str]]`: A tuple with an ordered list of the model's inputs, and the named outputs from
          the ONNX configuration.
      """
      # This is needed to import onnx and tf2onnx because onnx is also the name of the current directory.
      import sys
  
      import onnx
      import tensorflow as tf
      import tf2onnx
  
      sys_path_backup = sys.path
      sys.path.pop(0)
  
      sys.path = sys_path_backup
  
      logger.info(f"Using framework TensorFlow: {tf.__version__}")
  
      model.config.return_dict = True
  
      # Check if we need to override certain configuration item
      if config.values_override is not None:
          logger.info(
              f"Overriding {len(config.values_override)} configuration item(s)"
          )
          for (
              override_config_key,
              override_config_value,
          ) in config.values_override.items():
              logger.info(
                  f"\t- {override_config_key} -> {override_config_value}"
              )
              setattr(
                  model.config,
                  override_config_key,
                  override_config_value,
              )
  
      # Ensure inputs match
      dummy_inputs = config.generate_dummy_inputs(framework="tf")
      check_dummy_inputs_are_allowed(model, dummy_inputs)
  
      inputs = config.ordered_inputs(model)
      input_names = list(inputs.keys())
      output_names = list(config.outputs.keys())
  
      input_signature = []
      for key, tensor in dummy_inputs.items():
          shape = [tensor.shape[i] for i in range(tensor.ndim)]
          for idx, _ in config.inputs[key].items():
              shape[idx] = None
  
          input_signature.append(
              tf.TensorSpec(shape, dtype=tensor.dtype, name=key)
          )
  
      with config.patch_model_for_export(model):
          onnx_model, _ = tf2onnx.convert.from_keras(
              model, input_signature, opset=opset
          )
      onnx.save(onnx_model, output.as_posix())
  
      return input_names, output_names
  
imports: import copy
  import gc
  import multiprocessing
  import os
  import traceback
  from inspect import signature
  from itertools import chain
  from pathlib import Path
  from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  import numpy
  import onnx
  from transformers.utils import is_tf_available, is_torch_available
  from ...onnx.utils import _get_onnx_external_data_tensors, check_model_uses_external_data
  from ...utils import TORCH_MINIMUM_VERSION, is_diffusers_available, is_torch_onnx_support_available, logging, require_numpy_strictly_lower
  from ..error_utils import AtolError, MinimumVersionError, OutputMatchError, ShapeError
  from .base import OnnxConfig
  from .model_configs import SpeechT5OnnxConfig
  from .utils import PickableInferenceSession, recursive_to_device
label_desc: Use image node_id 6 for calling a global function with example usage: export_tensorflow(model, config, opset, output) and returns: input_names,  output_names