code: def export(
      model: "TFPreTrainedModel",
      config: "TFLiteConfig",
      output: Path,
      task: Optional[str] = None,
      preprocessor: Optional[Preprocessor] = None,
      quantization_config: Optional["TFLiteQuantizationConfig"] = None,
  ) -> Tuple[List[str], List[str]]:
      """
      Exports a TensorFlow model to a TensorFlow Lite model.
  
      Args:
          model ([`TFPreTrainedModel`]):
              The model to export.
          config ([`~exporters.tflite.TFLiteConfig`]):
              The TFLite configuration associated with the exported model.
          output (`Path`):
              Directory to store the exported TFLite model.
          task (`Optional[str]`, defaults to `None`):
              The task of the model. If left unspecified the task will be inferred automatically. Only needed for static
              quantization.
          preprocessor (`Optional[Preprocessor]`, defaults to `None`):
              The preprocessor associated to the model. This is used for preprocessing the dataset before feeding data to
              the model during calibration.
          quantization_config (`Optional[TFLiteQuantizationConfig]`, defaults to `None`):
              The dataclass containing all the needed information to perform quantization.
  
      Returns:
          `Tuple[List[str], List[str]]`: A tuple with an ordered list of the model's inputs, and the named inputs from
          the TFLite configuration.
      """
      if not is_tf_available():
          raise ImportError(
              "Cannot convert because TensorFlow is not installed. "
              "Please install TensorFlow first."
          )
      import tensorflow as tf
  
      output.parent.mkdir(parents=True, exist_ok=True)
  
      logger.info(f"Using 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,
              )
  
      signatures = config.model_to_signatures(model)
  
      with TemporaryDirectory() as tmp_dir_name:
          model.save(tmp_dir_name, signatures=signatures)
          converter = tf.lite.TFLiteConverter.from_saved_model(
              tmp_dir_name
          )
  
          if quantization_config is not None:
              prepare_converter_for_quantization(
                  model,
                  config,
                  preprocessor,
                  signatures,
                  quantization_config,
                  converter,
                  task=task,
              )
  
          tflite_model = converter.convert()
  
      with open(output, "wb") as fp:
          fp.write(tflite_model)
  
      return config.inputs, config.outputs
  
file_path: optimum/optimum/exporters/tflite/convert.py
imports: from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple
  import numpy
  from transformers import PreTrainedTokenizerBase
  from transformers.utils import is_tf_available
  from ...utils import logging
  from ...utils.preprocessing import Preprocessor, TaskProcessorsManager
  from ..error_utils import AtolError, OutputMatchError, ShapeError
  from .base import QuantizationApproach, QuantizationApproachNotSupported
label_desc: Use image node_id 4 for calling a global function with example usage: export(model, config, output, task, preprocessor, quantization_config) and returns: config,  config