code: def test_terraformer_quick(
      self, backend, encoder_attention_type, preembed
  ):
      with fastmath.use_backend(backend):
          vocab_size = 2
          input_vocab_size = None if preembed else vocab_size
          output_vocab_size = vocab_size if preembed else None
          max_len = 2
  
          model = terraformer.ConfigurableTerraformer(
              input_vocab_size,
              d_model=4,
              d_ff=4,
              n_encoder_layers=1,
              n_decoder_layers=1,
              n_heads=2,
              dropout=0.05,
              max_len=max_len,
              pos_type=None,
              ff_activation=tl.Relu,
              ff_use_sru=0,
              ff_chunk_size=2,
              mode="train",
              output_vocab_size=output_vocab_size,
              encoder_attention_type=encoder_attention_type,
          )
  
          if preembed:
              model_inputs = [
                  np.ones((1, max_len, 3)).astype(np.float32),
                  np.ones((1, max_len)).astype(bool),
              ]
          else:
              model_inputs = [np.ones((1, max_len)).astype(np.int32)]
          x = model_inputs + [np.ones((1, max_len)).astype(np.int32)]
          model.init(shapes.signature(x))
  
          logits, dec_toks = model(x)
          del dec_toks
  
          self.assertEqual(logits.shape, (1, max_len, vocab_size))
  
imports: import functools
  from absl.testing import absltest
  from absl.testing import parameterized
  import gin
  import numpy
  from trax import fastmath
  from trax import layers
  from trax import shapes
  from trax.layers import test_utils
  from trax.models.research import terraformer
label_desc: Use image node_id 4 for calling the TerraformerTest obj's underlying member method code with example usage: obj.test_terraformer_quick(backend, encoder_attention_type, preembed) without return types