class_docstr: A CheckpointCallback class that handles additional logging and
  model's checkpointing.
docstr: Performs a callback whenever an iteration ends.
  
  Args:
      iteration: Current iteration.
      opt_model: An instance of the optimization model.
docstr_tok: ["Performs","a","callback","whenever","an","iteration","ends",".","Args",":","iteration",":","Current","iteration",".","opt_model",":","An","instance","of","the","optimization","model","."]
code: def on_iteration_end(
      self, iteration: int, opt_model: Opytimizer
  ) -> None:
      """Performs a callback whenever an iteration ends.
  
      Args:
          iteration: Current iteration.
          opt_model: An instance of the optimization model.
  
      """
  
      if self.frequency > 0:
          if iteration % self.frequency == 0:
              opt_model.save(f"iter_{iteration}_{self.file_path}")
  
imports: from typing import List, TypeVar, Union
  import numpy
  import opytimizer.utils.exception
  from opytimizer.core.space import Space
label_desc: Use image node_id 6 for calling the CheckpointCallback obj's underlying member method code with example usage: obj.on_iteration_end(iteration, opt_model) without return types