code: def gru(
      incoming,
      n_units,
      activation="tanh",
      inner_activation="sigmoid",
      dropout=None,
      bias=True,
      weights_init=None,
      return_seq=False,
      return_state=False,
      initial_state=None,
      dynamic=False,
      trainable=True,
      restore=True,
      reuse=False,
      scope=None,
      name="GRU",
  ):
      """GRU.
  
      Gated Recurrent Unit Layer.
  
      Input:
          3-D Tensor Layer [samples, timesteps, input dim].
  
      Output:
          if `return_seq`: 3-D Tensor [samples, timesteps, output dim].
          else: 2-D Tensor [samples, output dim].
  
      Arguments:
          incoming: `Tensor`. Incoming 3-D Tensor.
          n_units: `int`, number of units for this layer.
          activation: `str` (name) or `function` (returning a `Tensor`).
              Activation applied to this layer (see tflearn.activations).
              Default: 'tanh'.
          inner_activation: `str` (name) or `function` (returning a `Tensor`).
              GRU inner activation. Default: 'sigmoid'.
          dropout: `tuple` of `float`: (input_keep_prob, output_keep_prob). The
              input and output keep probability.
          bias: `bool`. If True, a bias is used.
          weights_init: `str` (name) or `Tensor`. Weights initialization.
              (See tflearn.initializations).
          return_seq: `bool`. If True, returns the full sequence instead of
              last sequence output only.
          return_state: `bool`. If True, returns a tuple with output and
              states: (output, states).
          initial_state: `Tensor`. An initial state for the RNN.  This must be
              a tensor of appropriate type and shape [batch_size x cell.state_size].
          dynamic: `bool`. If True, dynamic computation is performed. It will not
              compute RNN steps above the sequence length. Note that because TF
              requires to feed sequences of same length, 0 is used as a mask.
              So a sequence padded with 0 at the end must be provided. When
              computation is performed, it will stop when it meets a step with
              a value of 0.
          trainable: `bool`. If True, weights will be trainable.
          restore: `bool`. If True, this layer weights will be restored when
              loading a model.
          reuse: `bool`. If True and 'scope' is provided, this layer variables
              will be reused (shared).
          scope: `str`. Define this layer scope (optional). A scope can be
              used to share variables between layers. Note that scope will
              override name.
          name: `str`. A name for this layer (optional).
  
      References:
          Learning Phrase Representations using RNN Encoder–Decoder for
          Statistical Machine Translation, K. Cho et al., 2014.
  
      Links:
          [http://arxiv.org/abs/1406.1078](http://arxiv.org/abs/1406.1078)
  
      """
      cell = GRUCell(
          n_units,
          activation=activation,
          inner_activation=inner_activation,
          bias=bias,
          weights_init=weights_init,
          trainable=trainable,
          restore=restore,
          reuse=reuse,
      )
      x = _rnn_template(
          incoming,
          cell=cell,
          dropout=dropout,
          return_seq=return_seq,
          return_state=return_state,
          initial_state=initial_state,
          dynamic=dynamic,
          scope=scope,
          name=name,
      )
  
      return x
  
imports: from __future__ import division, print_function, absolute_import
  import logging
  import numpy
  import tensorflow.compat.v1
  from tensorflow.python.ops import array_ops
  from tensorflow.python.util.nest import is_sequence
  from ..None import config
  from ..None import utils
  from ..None import activations
  from ..None import initializations
  from ..None import variables
  from .normalization import batch_normalization
label_desc: Use image node_id 4 for calling a global function with example usage: gru(incoming, n_units, activation, inner_activation, dropout, bias, weights_init, return_seq, return_state, initial_state, dynamic, trainable, restore, reuse, scope, name) and returns: x