code: def __init__(
      self,
      parent,
      vocab_size=99,
      batch_size=13,
      encoder_seq_length=7,
      # For common tests
      use_attention_mask=True,
      hidden_size=32,
      num_hidden_layers=2,
      num_attention_heads=4,
      d_ff=37,
      relative_attention_num_buckets=8,
      is_training=False,
      dropout_rate=0.1,
      initializer_factor=0.002,
      is_encoder_decoder=False,
      eos_token_id=1,
      pad_token_id=0,
      scope=None,
  ):
      self.parent = parent
      self.batch_size = batch_size
      self.encoder_seq_length = encoder_seq_length
      # For common tests
      self.seq_length = self.encoder_seq_length
      self.use_attention_mask = use_attention_mask
      self.vocab_size = vocab_size
      self.hidden_size = hidden_size
      self.num_hidden_layers = num_hidden_layers
      self.num_attention_heads = num_attention_heads
      self.d_ff = d_ff
      self.relative_attention_num_buckets = (
          relative_attention_num_buckets
      )
      self.dropout_rate = dropout_rate
      self.initializer_factor = initializer_factor
      self.eos_token_id = eos_token_id
      self.pad_token_id = pad_token_id
      self.is_encoder_decoder = is_encoder_decoder
      self.scope = None
      self.is_training = is_training
  
imports: from __future__ import annotations
  import unittest
  from transformers import T5Config, is_tf_available
  from transformers.testing_utils import require_sentencepiece, require_tf, require_tokenizers, slow
  from transformers.utils import cached_property
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 1 to create a new TFT5EncoderOnlyModelTester object  with example: obj = TFT5EncoderOnlyModelTester(parent, vocab_size, batch_size, encoder_seq_length, use_attention_mask, hidden_size, num_hidden_layers, num_attention_heads, d_ff, relative_attention_num_buckets, is_training, dropout_rate, initializer_factor, is_encoder_decoder, eos_token_id, pad_token_id, scope)