class_docstr: Block for text data.
  
  # Arguments
      block_type: String. 'vanilla', 'transformer', and 'ngram'. The type of
          Block to use. 'vanilla' and 'transformer' use a TextToIntSequence
          vectorizer, whereas 'ngram' uses TextToNgramVector. If unspecified,
          it will be tuned automatically.
      max_tokens: Int. The maximum size of the vocabulary.
          If left unspecified, it will be tuned automatically.
      pretraining: String. 'random' (use random weights instead any pretrained
          model), 'glove', 'fasttext' or 'word2vec'. Use pretrained word
          embedding.  If left unspecified, it will be tuned automatically.
code: def __init__(
      self,
      block_type: Optional[str] = None,
      max_tokens: Optional[int] = None,
      pretraining: Optional[str] = None,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.block_type = block_type
      self.max_tokens = max_tokens
      self.pretraining = pretraining
  
imports: from typing import Optional
  from tensorflow import nest
  from autokeras.blocks import basic
  from autokeras.blocks import preprocessing
  from autokeras.blocks import reduction
  from autokeras.engine import block
label_desc: Use image node_id 1 to create a new TextBlock object from inherited base classes: block_module with example: obj = TextBlock(block_type, max_tokens, pretraining)