class_docstr: A History class is responsible for saving each iteration's output.
  
  Note that you can use dump() and parse() for whatever your needs. Our default
  is only for agents, best agent and best agent's index.
docstr: Initialization method.
  
  Args:
      save_agents: Saves all agents in the search space.
docstr_tok: ["Initialization","method",".","Args",":","save_agents",":","Saves","all","agents","in","the","search","space","."]
code: def __init__(self, save_agents: bool = False) -> None:
      """Initialization method.
  
      Args:
          save_agents: Saves all agents in the search space.
  
      """
  
      self.save_agents = save_agents
  
file_path: opytimizer/opytimizer/utils/history.py
imports: from typing import Any, List, Optional, Tuple, Union
  import numpy
  import opytimizer.utils.exception
label_desc: Use image node_id 1 to create a new History object  with example: obj = History(save_agents)