code: def create_converter(
      model: str, model_loader: Callable[[str], lite.TFLiteConverter]
  ) -> lite.TFLiteConverter:
      """Setup the TFLite converter
  
      Args:
          model (str): model filename
          model_loader (Callable[[str], lite.TFLiteConverter]): function to load model file and return a `TFLiteConverter`
  
      Returns:
          lite.TFLiteConverter: `TFLiteConverter` with additional arguments set up.
  
      """
      if FLAGS.type != "float":
          assert (
              FLAGS.opt != "none"
          ), "--opt=default is required for quantization."
      else:
          assert (
              FLAGS.opt == "none"
          ), "--opt=none is required for float32 operation."
  
      converter = model_loader(model)
      if FLAGS.load:
          try:
              import sys, importlib
  
              sys.path.insert(0, path.dirname(path.abspath(FLAGS.load)))
              mod = path.basename(FLAGS.load).rstrip(".py")
              mod = importlib.import_module(mod)
              get_dataset = getattr(mod, "get_dataset")
          except Exception as error:  # pragma: no cover
              logger.fatal(
                  "Failed to import get_dataset from %s.py", FLAGS.load
              )
              raise error
          data = get_dataset()
  
          def data_gen():
              for i in data:
                  yield [i[0].numpy().astype(np.float32)]
  
      else:
          data_gen = None
      return setup_tfconverter(
          converter, FLAGS.type, FLAGS.opt, FLAGS.ops, data_gen
      )
  
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 2 for calling a global function with example usage: create_converter(model, model_loader) and returns: setup_tfconverter