class_docstr: Token Turing Machine main model encoder.
  
  It implements https://arxiv.org/abs/2211.09119. It essentially repeats
  TokenTuringMachineUnit for the number of steps (of the input tensor).
  
  This version is for the training and inference with a fixed shaped, static
  input tensor. One will need to modify/extend this module together with the
  data pipeline for the streaming inference implementation.
  
  Attributes:
    process_size: Number of tokens for the Transformer to process.
    memory_size: The number of memory tokens in the TTM.
    memory_mode: Specifies the token summarization method to use. Supports
      'TL', 'TL-MHA', or 'TL-AddErase'.
    processing_unit: Specifies which processing unit module to use. Supports
      'transformer', 'mixer', or 'mlp'.
    num_layers: Number of layers in the processing unit.
code: def setup(self):
      self.unit_function = TokenTuringMachineUnit(
          process_size=self.process_size,
          memory_size=self.memory_size,
          num_layers=self.num_layers,
          memory_mode=self.memory_mode,
          processing_unit=self.processing_unit,
          dropout_rate=self.dropout_rate,
      )
  
imports: from typing import Tuple
  from absl import logging
  import flax.linen
  import jax
  import jax.numpy
  from scenic.model_lib.layers import attention_layers
  from scenic.projects.baselines import mixer
  from scenic.projects.baselines import vit
  from scenic.projects.token_learner import model
label_desc: Use image node_id 1 for calling the TokenTuringMachineEncoder obj's underlying member method code with example usage: obj.setup() without return types