code: def _get_serve_image_fn(model):
      """Returns a function that feeds the input tensor into the model."""
  
      @tf.function
      def serve_image_fn(image_tensor):
          """Returns the output to be used in the serving signature.
  
          Args:
            image_tensor: A tensor represeting input image. The image should have 3
              channels.
  
          Returns:
            The model's predicton on input image tensor
          """
          return model(image_tensor)
  
      return serve_image_fn
  
imports: import os
  from typing import List
  import absl
  import flatbuffers
  import tensorflow
  import tensorflow_transform
  from tfx.components.trainer.fn_args_utils import DataAccessor
  from tfx.components.trainer.fn_args_utils import FnArgs
  from tfx.components.trainer.rewriting import converters
  from tfx.components.trainer.rewriting import rewriter
  from tfx.components.trainer.rewriting import rewriter_factory
  from tfx.dsl.io import fileio
  from tfx_bsl.tfxio import dataset_options
  from tflite_support import metadata_schema_py_generated
  from tflite_support import metadata
label_desc: Use image node_id 2 for calling a global function with example usage: _get_serve_image_fn(model) and returns: serve_image_fn, model