class_docstr: !
  @brief Genetic algorithm observer that is used to collect information about clustering process on each iteration.
class_docstr_tok: ["!","@","brief","Genetic","algorithm","observer","that","is","used","to","collect","information","about","clustering","process","on","each","iteration","."]
docstr: !
  @brief Stores the best chromosome and its fitness function's value.
  
  @param[in] best_chromosome (list): The best chromosome that were observed.
  @param[in] best_fitness_function (float): Fitness function value of the best chromosome.
docstr_tok: ["!","@","brief","Stores","the","best","chromosome","and","its","fitness","function","'s","value",".","@","param","[","in","]","best_chromosome","(","list",")",":","The","best","chromosome","that","were","observed",".","@","param","[","in","]","best_fitness_function","(","float",")",":","Fitness","function","value","of","the","best","chromosome","."]
code: def collect_global_best(self, best_chromosome, best_fitness_function):
      """!
      @brief Stores the best chromosome and its fitness function's value.
  
      @param[in] best_chromosome (list): The best chromosome that were observed.
      @param[in] best_fitness_function (float): Fitness function value of the best chromosome.
  
      """
  
      if not self._need_global_best:
          return
  
      self._global_best_result["chromosome"].append(best_chromosome)
      self._global_best_result["fitness_function"].append(
          best_fitness_function
      )
  
imports: import numpy
  import matplotlib.pyplot
  import matplotlib.animation
  from pyclustering.cluster import cluster_visualizer
  from pyclustering.cluster.ga_maths import ga_math
label_desc: Use image node_id 3 for calling the ga_observer obj's underlying member method code with example usage: obj.collect_global_best(best_chromosome, best_fitness_function) without return types