code: def load(in_path: str):
      summarizer_path = os.path.join(in_path, "summarizer.pkl")
      encoder_path = os.path.join(in_path, "encoder")
      decoder_path = os.path.join(in_path, "decoder")
      with open(summarizer_path, "rb") as handle:
          summarizer = pickle.load(handle)
      summarizer.encoder = Encoder(
          summarizer.embedding_shape_in,
          summarizer.lstm_size,
          embedding_trainable=summarizer.embedding_encoder_trainable,
      )
      summarizer.decoder = Decoder(
          summarizer.embedding_shape_out,
          summarizer.lstm_size,
          embedding_trainable=summarizer.embedding_decoder_trainable,
      )
      optimizer = AttentionSummarizer._new_optimizer()
      summarizer.encoder.compile(optimizer=optimizer)
      summarizer.decoder.compile(optimizer=optimizer)
      summarizer.encoder.load_weights(encoder_path)
      summarizer.decoder.load_weights(decoder_path)
      summarizer.optimizer = summarizer.encoder.optimizer
      return summarizer
  
imports: import os
  import pickle
  from typing import Callable, Dict, Union
  import numpy
  import tensorflow
  from headliner.model.attention_model import Encoder, Decoder
  from headliner.model.summarizer import Summarizer
  from headliner.preprocessing.preprocessor import Preprocessor
  from headliner.preprocessing.vectorizer import Vectorizer
label_desc: Use image node_id 8 for calling the AttentionSummarizer obj's underlying member method code with example usage: obj.load(in_path) and returns: summarizer