code: def log_variable_sizes(var_list=None, tag=None, verbose=False):
      """Log the sizes and shapes of variables, and the total size.
  
      Args:
        var_list: a list of variables; defaults to trainable_variables
        tag: a string; defaults to "Trainable Variables"
        verbose: bool, if True, log every weight; otherwise, log total size only.
      """
      if var_list is None:
          var_list = tf.trainable_variables()
      if tag is None:
          tag = "Trainable Variables"
  
      if not var_list:
          return
  
      name_to_var = {v.name: v for v in var_list}
      total_size = 0
      for v_name in sorted(list(name_to_var)):
          v = name_to_var[v_name]
          v_size = int(np.prod(np.array(v.shape.as_list())))
          if verbose:
              tf.logging.info(
                  "Weight    %s\tshape    %s\tsize    %d",
                  v.name[:-2].ljust(80),
                  str(v.shape).ljust(20),
                  v_size,
              )
          total_size += v_size
      tf.logging.info("%s Total size: %d", tag, total_size)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import adafactor
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import misc_utils
  from tensor2tensor.utils import mlperf_log
  from tensor2tensor.utils import multistep_optimizer
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import yellowfin
  import tensorflow.compat.v1
  from tensorflow.python.framework import dtypes
label_desc: Use image node_id 14 for calling a global function with example usage: log_variable_sizes(var_list, tag, verbose) without return types