code: def summarize_variables(var_list=None, tag=None):
    
    if var_list is None:
      var_list = tf.trainable_variables()
    if tag is None:
      tag = "training_variables/"
  
    name_to_var = {v.name: v for v in var_list}
    for v_name in list(name_to_var):
      v = name_to_var[v_name]
      tf.summary.histogram(tag + v_name, v)
docs: Summarize the variables.
  
    Args:
      var_list: a list of variables; defaults to trainable_variables.
      tag: name scope of the summary; defaults to training_variables/.