code: def summarize_mean_in_nats_and_bits(
      inputs,
      units,
      name,
      nats_name_scope="nats",
      bits_name_scope="bits_per_dim",
  ):
      """Summarize the mean of a tensor in nats and bits per unit.
  
      Args:
        inputs: A tensor of values measured in nats.
        units: The units of the tensor with which to compute the mean bits
          per unit.
        name: The name of the tensor.
        nats_name_scope: The name scope of the nats summary.
        bits_name_scope: The name scope of the bits summary.
      """
      mean = tf1.reduce_mean(input_tensor=inputs)
      with tf1.name_scope(nats_name_scope):
          tf.summary.scalar(
              name, mean, step=tf1.train.get_or_create_global_step()
          )
      with tf1.name_scope(bits_name_scope):
          tf.summary.scalar(
              name,
              mean / units / tf1.math.log(2.0),
              step=tf1.train.get_or_create_global_step(),
          )
  
imports: from datetime import datetime
  import functools
  from absl import app
  from absl import flags
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  import tensorflow_probability
  from tensorflow_probability.examples import sprites_dataset
  from tensorflow_probability.python.internal import tf_keras
label_desc: Use image node_id 5 for calling a global function with example usage: summarize_mean_in_nats_and_bits(inputs, units, name, nats_name_scope, bits_name_scope) without return types