code: def save(self, directory=None, append_timestep=True):
          
          if self.flush_summarizer is not None:
              self.monitored_session.run(fetches=self.flush_summarizer)
  
          return self.saver.save(
              sess=self.session,
              save_path=(self.saver_directory if directory is None else directory),
              global_step=(self.global_timestep if append_timestep else None),
              # latest_filename=None,  # Defaults to 'checkpoint'.
              meta_graph_suffix='meta',
              write_meta_graph=True,
              write_state=True
          )
docs: Save TensorFlow model. If no checkpoint directory is given, the model's default saver
          directory is used. Optionally appends current timestep to prevent overwriting previous
          checkpoint files. Turn off to be able to load model from the same given path argument as
          given here.
  
          Args:
              directory: Optional checkpoint directory.
              append_timestep: Appends the current timestep to the checkpoint file if true.
  
          Returns:
              Checkpoint path where the model was saved.