code: def variable_summaries(var):
      """Attach a lot of summaries to a Tensor (for TensorBoard visualization)."""
      with tf.name_scope("summaries"):
          layer_weight_name = "_".join(var.name.split("/")[-3:])[:-2]
  
          with tf.name_scope(layer_weight_name):
              mean = tf.reduce_mean(var)
              tf.summary.scalar("mean", mean)
              with tf.name_scope("stddev"):
                  stddev = tf.sqrt(
                      tf.reduce_mean(tf.square(var - mean))
                  )
              tf.summary.scalar("stddev", stddev)
              tf.summary.scalar("max", tf.reduce_max(var))
              tf.summary.scalar("min", tf.reduce_min(var))
              tf.summary.histogram("histogram", var)
  
imports: import os
  import time
  from typing import Any, List, Tuple, Dict
  import numpy
  import tensorflow
  from rl_coach.architectures.architecture import Architecture
  from rl_coach.architectures.tensorflow_components.savers import GlobalVariableSaver
  from rl_coach.base_parameters import AgentParameters, DistributedTaskParameters
  from rl_coach.core_types import GradientClippingMethod
  from rl_coach.saver import SaverCollection
  from rl_coach.spaces import SpacesDefinition
  from rl_coach.utils import force_list, squeeze_list, start_shell_command_and_wait
label_desc: Use image node_id 1 for calling a global function with example usage: variable_summaries(var) without return types