code: def make_in_memory_finetune_hooks(model, estimator):
      hooks = []
      for f in model.config.in_memory_finetune:
          hooks.append(
              InMemoryFinetune(
                  config_to_eval=f["config"],
                  model=model,
                  eval_dir=estimator.eval_dir(),
                  X=f["X"],
                  Y=f["Y"],
                  X_test=f["X_test"],
                  Y_test=f["Y_test"],
                  name=f["name"],
                  every_n_iter=f["every_n_iter"],
              )
          )
      return hooks
  
file_path: finetune/finetune/util/in_memory_finetune.py
imports: import os
  import traceback
  import sys
  from tensorflow.core.framework import summary_pb2
  from tensorflow.python.summary.writer import writer_cache
  import tensorflow
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: make_in_memory_finetune_hooks(model, estimator) and returns: hooks