class_docstr: The hall of fame contains the best individual that ever lived in the
  population during the evolution. It is lexicographically sorted at all
  time so that the first element of the hall of fame is the individual that
  has the best first fitness value ever seen, according to the weights
  provided to the fitness at creation time.
  
  The insertion is made so that old individuals have priority on new
  individuals. A single copy of each individual is kept at all time, the
  equivalence between two individuals is made by the operator passed to the
  *similar* argument.
  
  :param maxsize: The maximum number of individual to keep in the hall of
                  fame.
  :param similar: An equivalence operator between two individuals, optional.
                  It defaults to operator :func:`operator.eq`.
  
  The class :class:`HallOfFame` provides an interface similar to a list
  (without being one completely). It is possible to retrieve its length, to
  iterate on it forward and backward and to get an item or a slice from it.
class_docstr_tok: ["The","hall","of","fame","contains","the","best","individual","that","ever","lived","in","the","population","during","the","evolution",".","It","is","lexicographically","sorted","at","all","time","so","that","the","first","element","of","the","hall","of","fame","is","the","individual","that","has","the","best","first","fitness","value","ever","seen",",","according","to","the","weights","provided","to","the","fitness","at","creation","time",".","The","insertion","is","made","so","that","old","individuals","have","priority","on","new","individuals",".","A","single","copy","of","each","individual","is","kept","at","all","time",",","the","equivalence","between","two","individuals","is","made","by","the","operator","passed","to","the","*","similar","*","argument",".",":","param","maxsize",":","The","maximum","number","of","individual","to","keep","in","the","hall","of","fame",".",":","param","similar",":","An","equivalence","operator","between","two","individuals",",","optional",".","It","defaults","to","operator",":","func",":","`","operator.eq","`",".","The","class",":","class",":","`","HallOfFame","`","provides","an","interface","similar","to","a","list","(","without","being","one","completely",")",".","It","is","possible","to","retrieve","its","length",",","to","iterate","on","it","forward","and","backward","and","to","get","an","item","or","a","slice","from","it","."]
docstr: Insert a new individual in the hall of fame using the
  :func:`~bisect.bisect_right` function. The inserted individual is
  inserted on the right side of an equal individual. Inserting a new
  individual in the hall of fame also preserve the hall of fame's order.
  This method **does not** check for the size of the hall of fame, in a
  way that inserting a new individual in a full hall of fame will not
  remove the worst individual to maintain a constant size.
  
  :param item: The individual with a fitness attribute to insert in the
               hall of fame.
docstr_tok: ["Insert","a","new","individual","in","the","hall","of","fame","using","the",":","func",":","`","~bisect.bisect_right","`","function",".","The","inserted","individual","is","inserted","on","the","right","side","of","an","equal","individual",".","Inserting","a","new","individual","in","the","hall","of","fame","also","preserve","the","hall","of","fame","'s","order",".","This","method","*","*","does","not","*","*","check","for","the","size","of","the","hall","of","fame",",","in","a","way","that","inserting","a","new","individual","in","a","full","hall","of","fame","will","not","remove","the","worst","individual","to","maintain","a","constant","size",".",":","param","item",":","The","individual","with","a","fitness","attribute","to","insert","in","the","hall","of","fame","."]
code: def insert(self, item):
      """Insert a new individual in the hall of fame using the
      :func:`~bisect.bisect_right` function. The inserted individual is
      inserted on the right side of an equal individual. Inserting a new
      individual in the hall of fame also preserve the hall of fame's order.
      This method **does not** check for the size of the hall of fame, in a
      way that inserting a new individual in a full hall of fame will not
      remove the worst individual to maintain a constant size.
  
      :param item: The individual with a fitness attribute to insert in the
                   hall of fame.
      """
      item = deepcopy(item)
      i = bisect_right(self.keys, item.fitness)
      self.items.insert(len(self) - i, item)
      self.keys.insert(i, item.fitness)
  
imports: from bisect import bisect_right
  from collections import defaultdict
  from copy import deepcopy
  from functools import partial
  from itertools import chain
  from operator import eq
label_desc: Use image node_id 3 for calling the HallOfFame obj's underlying member method code with example usage: obj.insert(item) without return types