code: def setup_tfconverter(
      converter: lite.TFLiteConverter,
      dtype: str,
      opt: str,
      ops: str,
      data_fun: Callable = None,
  ) -> lite.TFLiteConverter:
      """Setup control arguments for `TFLiteConverter <https://www.tensorflow.org/lite/convert>`_
  
      Args:
          converter (lite.TFLiteConverter): loaded `TFLiteConverter`.
          dtype (str): data types: `float`, `float16`, `int8`, `uint8`.
          opt (str): optimization: `none` for `float`, `default` for ther data types.
          ops (str): operation sets: `tflite`, `tf`, `int8`.
          data_fun (Callable, optional): [description]. Defaults to None.
  
      Returns:
          lite.TFLiteConverter: `TFLiteConverter` with additional arguments set up.
      """
  
      if data_fun:
          converter.representative_dataset = data_fun
      converter.optimizations = OPT_ARGS[opt]
      converter.target_spec.supported_ops = OPS_ARGS[ops]
      converter.target_spec.supported_types = TYPE_ARGS[dtype]
      return converter
  
file_path: auptimizer/src/aup/dlconvert/to_tflite.py
imports: import logging
  from os import path, environ
  from typing import Callable
  import numpy
  from absl import flags
  from tensorflow import lite
label_desc: Use image node_id 1 for calling a global function with example usage: setup_tfconverter(converter, dtype, opt, ops, data_fun) and returns: converter