code: def save_summaries(file_writer, global_step=None):
      """Call FileWriter.add_summary() with all summaries in the default graph,
      automatically finalizing and merging them on the first call.
      """
      global _merge_op
      tfutil.assert_tf_initialized()
  
      if _merge_op is None:
          layout = finalize_autosummaries()
          if layout is not None:
              file_writer.add_summary(layout)
          with tf.device(None), tf.control_dependencies(None):
              _merge_op = tf.summary.merge_all()
  
      file_writer.add_summary(_merge_op.eval(), global_step)
  
file_path: insightface/reconstruction/ostec/external/stylegan2/dnnlib/tflib/autosummary.py
imports: from collections import OrderedDict
  import numpy
  import tensorflow
  from tensorboard import summary
  from tensorboard.plugins.custom_scalar import layout_pb2
  from .None import tfutil
  from .tfutil import TfExpression
  from .tfutil import TfExpressionEx
label_desc: Use image node_id 4 for calling a global function with example usage: save_summaries(file_writer, global_step) without return types