class_docstr: A stack of layers for FunnelTransformer.
class_docstr_tok: ["A","stack","of","layers","for","FunnelTransformer","."]
docstr: Call the layer and its associated sublayers.
  
  Args:
    x: a Tensor
    layer: a Layer
    context: a Context
  Returns:
    a Tensor
docstr_tok: ["Call","the","layer","and","its","associated","sublayers",".","Args",":","x",":","a","Tensor","layer",":","a","Layer","context",":","a","Context","Returns",":","a","Tensor"]
code: def _layer_fn(self, x, layer, context):
      """Call the layer and its associated sublayers.
  
      Args:
        x: a Tensor
        layer: a Layer
        context: a Context
      Returns:
        a Tensor
      """
      context.current_layer = layer
      context.current_layer_input = x
      y = self._call_sublayers(self._sublayers_per_layer, x, context)
  
      # When pooling is done, context.current_layer_input will be updated inside
      # SelfAttentionPoolQ.call method, i.e., x != context.current_layer_input. So
      # we use context.current_layer_input to check the shape consistency.
      if y.shape != context.current_layer_input.shape:
          raise ValueError(
              "Layer %s returned misshaped output x=%s y=%s"
              % (layer.__class__.__name__, x, y)
          )
      return y
  
file_path: mesh/mesh_tensorflow/transformer/funnel_transformer.py
imports: import gin
  import mesh_tensorflow
  from mesh_tensorflow.transformer import transformer
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 5 for calling the FunnelTransformerLayerStack obj's underlying member method code with example usage: obj._layer_fn(x, layer, context) and returns: y