code: def save(self, out_path: str) -> None:
      if not os.path.exists(out_path):
          os.mkdir(out_path)
      summarizer_path = os.path.join(out_path, "summarizer.pkl")
      encoder_path = os.path.join(out_path, "encoder")
      decoder_path = os.path.join(out_path, "decoder")
      with open(summarizer_path, "wb+") as handle:
          pickle.dump(self, handle, protocol=pickle.HIGHEST_PROTOCOL)
      self.transformer.encoder.save_weights(
          encoder_path, save_format="tf"
      )
      self.transformer.decoder.save_weights(
          decoder_path, save_format="tf"
      )
  
imports: import os
  import pickle
  from typing import Callable
  from typing import Dict, Union
  import numpy
  import tensorflow
  from headliner.model.bert_model import Transformer, create_masks
  from headliner.model.summarizer import Summarizer
  from headliner.preprocessing.bert_vectorizer import BertVectorizer
  from headliner.preprocessing.preprocessor import Preprocessor
  from headliner.utils.logger import get_logger
label_desc: Use image node_id 7 for calling the BertSummarizer obj's underlying member method code with example usage: obj.save(out_path) without return types