code: def __init__(
      self,
      max_prediction_len=20,
      num_layers=1,
      num_heads=2,
      feed_forward_dim=512,
      dropout_rate=0,
      embedding_size=128,
      embedding_encoder_trainable=True,
      embedding_decoder_trainable=True,
      max_sequence_len=10000,
  ):
      super().__init__()
      self.max_prediction_len = max_prediction_len
      self.embedding_size = embedding_size
      self.num_layers = num_layers
      self.num_heads = num_heads
      self.dropout_rate = dropout_rate
      self.feed_forward_dim = feed_forward_dim
      self.embedding_encoder_trainable = embedding_encoder_trainable
      self.embedding_decoder_trainable = embedding_decoder_trainable
      self.optimizer = TransformerSummarizer.new_optimizer()
      self.transformer = None
      self.embedding_shape_in = None
      self.embedding_shape_out = None
      self.max_sequence_len = max_sequence_len
  
imports: import os
  import pickle
  from typing import Callable
  from typing import Dict, Union
  import numpy
  import tensorflow
  from headliner.model.summarizer import Summarizer
  from headliner.model.transformer_model import Transformer, create_masks
  from headliner.preprocessing.preprocessor import Preprocessor
  from headliner.preprocessing.vectorizer import Vectorizer
label_desc: Use image node_id 1 to create a new TransformerSummarizer object from inherited base classes: Summarizer with example: obj = TransformerSummarizer(max_prediction_len, num_layers, num_heads, feed_forward_dim, dropout_rate, embedding_size, embedding_encoder_trainable, embedding_decoder_trainable, max_sequence_len)