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 _build_block(self, hp, output_node, block_type):
      max_tokens = self.max_tokens or hp.Choice(
          MAX_TOKENS, [500, 5000, 20000], default=5000
      )
      if block_type == NGRAM:
          output_node = preprocessing.TextToNgramVector(
              max_tokens=max_tokens
          ).build(hp, output_node)
          return basic.DenseBlock().build(hp, output_node)
      if block_type == BERT:
          output_node = basic.BertBlock().build(hp, output_node)
      else:
          output_node = preprocessing.TextToIntSequence(
              max_tokens=max_tokens
          ).build(hp, output_node)
          if block_type == TRANSFORMER:
              output_node = basic.Transformer(
                  max_features=max_tokens + 1,
                  pretraining=self.pretraining,
              ).build(hp, output_node)
          else:
              output_node = basic.Embedding(
                  max_features=max_tokens + 1,
                  pretraining=self.pretraining,
              ).build(hp, output_node)
              output_node = basic.ConvBlock().build(hp, output_node)
          output_node = reduction.SpatialReduction().build(
              hp, output_node
          )
          output_node = basic.DenseBlock().build(hp, output_node)
      return output_node
  
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 4 for calling the TextBlock obj's underlying member method code with example usage: obj._build_block(hp, output_node, block_type) and returns: output_node, basic