code: def revnet(name, x, hparams, reverse=True):
      """'hparams.depth' steps of generative flow.
  
      Args:
        name: variable scope for the revnet block.
        x: 4-D Tensor, shape=(NHWC).
        hparams: HParams.
        reverse: bool, forward or backward pass.
      Returns:
        x: 4-D Tensor, shape=(NHWC).
        objective: float.
      """
      with tf.variable_scope(name, reuse=tf.AUTO_REUSE):
          steps = np.arange(hparams.depth)
          if reverse:
              steps = steps[::-1]
  
          objective = 0.0
          for step in steps:
              x, curr_obj = revnet_step(
                  "revnet_step_%d" % step, x, hparams, reverse=reverse
              )
              objective += curr_obj
          return x, objective
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import numpy
  import scipy
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tensorflow_probability
label_desc: Use image node_id 36 for calling a global function with example usage: revnet(name, x, hparams, reverse) and returns: x,  objective