code: def hook_loaded_model(
      tf_model: tf_ext.AutoTrackable, module_name: str
  ) -> tf_ext.AutoTrackable:
      """
      deprecated: bentoml now requires signatures before saving a tf model
      reserve for now because tensorflow v1 has not been adopted yet
      """
      tf_function_wrapper.hook_loaded_model(tf_model)
      logger.warning(TF_FUNCTION_WARNING)
      # pretty format loaded model
      logger.info(pretty_format_restored_model(tf_model))
      if hasattr(tf_model, "keras_api"):
          logger.warning(KERAS_MODEL_WARNING, module_name)
      return tf_model
  
imports: from __future__ import annotations
  import importlib.metadata
  import importlib.util
  import logging
  import typing
  from typing import TYPE_CHECKING
  from bentoml.exceptions import BentoMLException
  from ...types import LazyType
  from ...utils.lazy_loader import LazyLoader
label_desc: Use image node_id 1 for calling a global function with example usage: hook_loaded_model(tf_model, module_name) and returns: tf_model