code: def revnet_step(name, x, hparams, reverse=True):
      """One step of glow generative flow.
  
      Actnorm + invertible 1X1 conv + affine_coupling.
  
      Args:
        name: used for variable scope.
        x: input
        hparams: coupling_width is the only hparam that is being used in
                 this function.
        reverse: forward or reverse pass.
      Returns:
        z: Output of one step of reversible flow.
      """
      with tf.variable_scope(name, reuse=tf.AUTO_REUSE):
          if hparams.coupling == "additive":
              coupling_layer = functools.partial(
                  additive_coupling,
                  name="additive",
                  reverse=reverse,
                  mid_channels=hparams.coupling_width,
                  activation=hparams.activation,
                  dropout=hparams.coupling_dropout,
              )
          else:
              coupling_layer = functools.partial(
                  affine_coupling,
                  name="affine",
                  reverse=reverse,
                  mid_channels=hparams.coupling_width,
                  activation=hparams.activation,
                  dropout=hparams.coupling_dropout,
              )
          ops = [
              functools.partial(
                  actnorm, name="actnorm", reverse=reverse
              ),
              functools.partial(
                  invertible_1x1_conv,
                  name="invertible",
                  reverse=reverse,
              ),
              coupling_layer,
          ]
  
          if reverse:
              ops = ops[::-1]
  
          objective = 0.0
          for op in ops:
              x, curr_obj = op(x=x)
              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 35 for calling a global function with example usage: revnet_step(name, x, hparams, reverse) and returns: x,  objective