code: def before_run(self, run_context):
      fetches = {
          "global_step": self._global_step,
      }
  
      self._write_summaries = (
          self._next_step is None
          or self._timer.should_trigger_for_step(self._next_step)
      )
  
      if self._write_summaries:
          fetches["summary"] = self._vars_summary[self._mode]
  
      return tf.train.SessionRunArgs(fetches)
  
file_path: luminoth/luminoth/utils/hooks/var_vis_hook.py
imports: import tensorflow
  from tensorflow.python.training.summary_io import SummaryWriterCache
label_desc: Use image node_id 3 for calling the VarVisHook obj's underlying member method code with example usage: obj.before_run(run_context) and returns: tf