class_docstr: This class executes the self-play, learning and evaluating. 
class_docstr_tok: ["This","class","executes","the","self-play",",","learning","and","evaluating","."]
code: def saveTrainExamples(self, iteration):
      folder = self.args.checkpoint
      if not os.path.exists(folder):
          os.makedirs(folder)
      filename = os.path.join(
          folder, self.getCheckpointFile(iteration) + ".examples"
      )
      with open(filename, "wb+") as f:
          Pickler(f).dump(self.trainExamplesHistory)
      f.closed
  
file_path: PARL/examples/AlphaZero/Coach.py
imports: import os
  import sys
  import parl
  from actor import Actor
  from random import shuffle
  from parl.utils import logger
  from parl.utils import visualdl
  from pickle import Pickler, Unpickler
  from alphazero_agent import create_agent
  from utils import split_group, get_test_dataset
label_desc: Use image node_id 5 for calling the Coach obj's underlying member method code with example usage: obj.saveTrainExamples(iteration) without return types