code: def GRULM(vocab_size=256, d_model=512, n_layers=1, mode="train"):
      """Returns a GRU (gated recurrent unit) language model.
  
      This model performs autoregressive language modeling:
  
        - input: rank 2 tensor representing a batch of text strings via token IDs
          plus padding markers; shape is (batch_size, sequence_length). The tensor
          elements are integers in `range(vocab_size)`, and `0` values mark padding
          positions.
  
        - output: rank 3 tensor representing a batch of log-probability
          distributions for each sequence position over possible token IDs;
          shape is (batch_size, sequence_length, `vocab_size`).
  
      Args:
        vocab_size: Input vocabulary size -- each element of the input tensor
            should be an integer in `range(vocab_size)`. These integers typically
            represent token IDs from a vocabulary-based tokenizer.
        d_model: Embedding depth throughout the model.
        n_layers: Number of GRU layers.
        mode: If `'predict'`, use fast inference (and omit the right shift).
  
      Returns:
        A GRU language model as a layer that maps from a tensor of tokens
        to activations over a vocab set.
      """
      return tl.Serial(
          tl.ShiftRight(mode=mode),
          tl.Embedding(vocab_size, d_model),
          [tl.GRU(d_model, mode=mode) for _ in range(n_layers)],
          tl.Dense(vocab_size),
      )
  
imports: from trax import layers
  from trax.fastmath import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: GRULM(vocab_size, d_model, n_layers, mode) and returns: tl