code: def initialize_model(
      example_info_json: str, checkpoint_path: str
  ) -> Optional[tf.keras.Model]:
      """Initializes the model and gathers parameters.
  
      Args:
        example_info_json: Path to json file containing example shape.
        checkpoint_path: Path to model checkpoint.
  
      Returns:
        An initialized model.
      """
      logging.info("Reading example shape from %s", example_info_json)
      example_shape = dv_utils.get_shape_and_channels_from_json(
          example_info_json
      )[0]
      logging.info("Loading %s", checkpoint_path)
      logging.info("Example shape %s", example_shape)
      # Load model
      model = modeling.inceptionv3(
          example_shape, init_backbone_with_imagenet=False
      )
      # model.load_weights(checkpoint_path).expect_partial()
      # checkpoint = tf.train.Checkpoint(model=model)
      # Note that the `print_model_summary` is necessary because we need to run a
      # forward pass with the model in order for assert_existing_objects_matched to
      # work as expected. If you don't do this, then assert_existing_objects_matched
      # will not raise an error even if the wrong checkpoint is used.
      # Some context here: internal.
      input_shape = (
          1,
          example_shape[0],
          example_shape[1],
          example_shape[2],
      )
      modeling.print_model_summary(model, input_shape)
      model.load_weights(
          checkpoint_path
      ).expect_partial().assert_existing_objects_matched()
  
      # checkpoint.restore(
      #     checkpoint_path
      # ).expect_partial().assert_existing_objects_matched()
  
      logging.info("Finished initialize_model.")
      return model
  
file_path: deepvariant/deepvariant/convert_to_saved_model.py
imports: import os
  from typing import Optional
  from absl import app
  from absl import flags
  from absl import logging
  import tensorflow
  from deepvariant import dv_utils
  from deepvariant import keras_modeling
  from tensorflow.python.platform import gfile
label_desc: Use image node_id 2 for calling a global function with example usage: initialize_model(example_info_json, checkpoint_path) and returns: model