docstr: Prevents pickle from serializing the transformer and optimizer 
docstr_tok: ["Prevents","pickle","from","serializing","the","transformer","and","optimizer"]
code: def __getstate__(self):
      """Prevents pickle from serializing the transformer and optimizer"""
      state = self.__dict__.copy()
      del state["transformer"]
      del state["logger"]
      del state["optimizer_encoder"]
      del state["optimizer_decoder"]
      return state
  
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 2 for calling the BertSummarizer obj's underlying member method code with example usage: obj.__getstate__() and returns: state