code: def test_temporal_latent_to_dist(
      self,
      apply_dilation,
      activation,
      dropout=0.0,
      noise=0.1,
      num_steps=5,
  ):
      with tf.Graph().as_default():
          hparams = self.get_glow_hparams()
          hparams.latent_apply_dilations = apply_dilation
          hparams.latent_activation = activation
          hparams.latent_dropout = dropout
          hparams.latent_noise = noise
          latent_shape = (16, num_steps, 32, 32, 48)
          latents = tf.random_normal(latent_shape)
          dist = glow_ops.temporal_latent_to_dist(
              "tensor_to_dist", latents, hparams
          )
          with tf.Session() as sess:
              sess.run(tf.global_variables_initializer())
              # dilated conv_3d is not available on CPU.
              is_gpu = tf.test.is_gpu_available()
              if not apply_dilation or is_gpu:
                  mean, scale = dist.loc, dist.scale
                  mean_np, scale_np = sess.run([mean, scale])
                  self.assertTrue(np.allclose(mean_np, 0.0))
                  self.assertTrue(np.allclose(scale_np, 1.0))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tempfile
  from absl.testing import parameterized
  import numpy
  from six.moves import range
  from six.moves import zip
  from tensor2tensor.models.research import glow
  from tensor2tensor.models.research import glow_ops
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import hparam
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 20 for calling the GlowOpsTest obj's underlying member method code with example usage: obj.test_temporal_latent_to_dist(apply_dilation, activation, dropout, noise, num_steps) without return types