code: def concrete_function_from_keras_model(model):
      input_signature = None
      # If the model's call is not a `tf.function`, then we need to first get its
      # input signature from `model_input_signature` method. We can't directly
      # call `trace_model_call` because otherwise the batch dimension is set
      # to None.
      # Once we have better support for dynamic shapes, we can remove this.
      if not isinstance(model.call, def_function.Function):
          # Pass `keep_original_batch_size=True` will ensure that we get an input
          # signature including the batch dimension specified by the user.
          input_signature = saving_utils.model_input_signature(
              model, keep_original_batch_size=True
          )
  
      func = saving_utils.trace_model_call(model, input_signature)
      return func.get_concrete_function()
  
file_path: compute-engine/larq_compute_engine/mlir/python/converter.py
imports: import os
  import warnings
  from typing import Optional, Union
  import tensorflow
  import tempfile
  from larq_compute_engine.mlir._tf_tfl_flatbuffer import convert_graphdef_to_tflite_flatbuffer, convert_saved_model_to_tflite_flatbuffer
  from larq_compute_engine.mlir.python.util import modify_integer_quantized_model_io_type
  from tensorflow.core.framework.types_pb2 import DataType
  from tensorflow.lite.python.util import get_tensor_name
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2
  from tensorflow.python.keras.saving import saving_utils
label_desc: Use image node_id 1 for calling a global function with example usage: concrete_function_from_keras_model(model) and returns: func