code: def _get_weights(self, session):
      if (
          not self.keep_best_model
          or self.saver.variables is None
          or self.get_current_weights
      ):
          self.saver.variables = dict(
              zip(
                  (var.name for var in self.included),
                  session.run(self.included),
              )
          )
          if self.cache_weights_to_file:
              joblib.dump(
                  self.saver.variables,
                  os.path.join(
                      self.estimator.eval_dir(), "..", "weights.jl"
                  ),
              )
          self.get_current_weights = False
  
imports: import os
  from concurrent.futures import ThreadPoolExecutor
  import logging
  import sys
  import re
  import joblib
  import numpy
  import tensorflow
  from tensorflow.compat.v1.train import SessionRunHook
  from tensorflow_estimator.python.estimator.early_stopping import _StopOnPredicateHook
  from finetune.errors import FinetuneError
  from finetune.config import get_config
  from finetune.util.metrics import read_eval_metrics
label_desc: Use image node_id 5 for calling the SaverHook obj's underlying member method code with example usage: obj._get_weights(session) without return types