code: def _rev_layer_forward(
      xs, f, g, f_side_input, g_side_input, gate_outputs=False
  ):
      """Forward for 1 reversible layer."""
      x1, x2 = xs
      y1 = x1 + (f(x2, f_side_input) if f_side_input else f(x2))
      y2 = x2 + (g(y1, g_side_input) if g_side_input else g(y1))
      if gate_outputs:
          return control_flow_ops.tuple([y1, y2])
      else:
          return (y1, y2)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import re
  import numpy
  import six
  from six.moves import xrange
  from ..None import contrib_framework
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.layers import base
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import nest
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 2 for calling a global function with example usage: _rev_layer_forward(xs, f, g, f_side_input, g_side_input, gate_outputs) and returns: control_flow_ops, y1,  y2