code: def load(in_path: str):
      summarizer_path = os.path.join(in_path, "summarizer.pkl")
      transformer_path = os.path.join(in_path, "transformer")
      with open(summarizer_path, "rb") as handle:
          summarizer = pickle.load(handle)
      summarizer.transformer = Transformer(
          num_layers=summarizer.num_layers,
          num_heads=summarizer.num_heads,
          feed_forward_dim=summarizer.feed_forward_dim,
          embedding_shape_encoder=summarizer.embedding_shape_in,
          embedding_shape_decoder=summarizer.embedding_shape_out,
          embedding_encoder_trainable=summarizer.embedding_encoder_trainable,
          embedding_decoder_trainable=summarizer.embedding_decoder_trainable,
          dropout_rate=summarizer.dropout_rate,
      )
      optimizer = TransformerSummarizer.new_optimizer()
      summarizer.transformer.compile(optimizer=optimizer)
      summarizer.transformer.load_weights(transformer_path)
      summarizer.optimizer = summarizer.transformer.optimizer
      return summarizer
  
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 8 for calling the TransformerSummarizer obj's underlying member method code with example usage: obj.load(in_path) and returns: summarizer