original_docstring: 
      Create a bar chart representing the labels repartition.
  
      :param label2counts: A dict holding the counts for each label, of the form
          {label: [count_at_step_0, count_at_step_1, ...]}. Only the last count of
          each label is used here.
      :param counters: (unused) The steps the counts were taken at.
      :param colors: The colors to use in the chart.
      
docstring: Create a bar chart representing the labels repartition.
docstring_tokens: Create a bar chart representing the labels repartition .
code: def repartition_bar_chart_image_creator(
      label2counts: Dict[int, List[int]],
      counters: List[int],
      colors: Union[ndarray, Iterable, int, float] = SEABORN_COLORS,
  ):
      """
      Create a bar chart representing the labels repartition.
  
      :param label2counts: A dict holding the counts for each label, of the form
          {label: [count_at_step_0, count_at_step_1, ...]}. Only the last count of
          each label is used here.
      :param counters: (unused) The steps the counts were taken at.
      :param colors: The colors to use in the chart.
      """
      fig, ax = plt.subplots()
      ax: Axes
  
      y = -arange(len(label2counts))
      labels, counts = zip(*((label, c[-1]) for label, c in label2counts.items()))
      total = sum(counts)
  
      ax.barh(y, width=counts, color=colors)
      ax.set_yticks(y)
      ax.set_yticklabels(labels)
  
      ax.set_xlabel("Number of exemplars")
      ax.set_ylabel("Class")
  
      for i, count in enumerate(counts):
          ax.text(count / 2, -i, f"{count/total:.1%}", va="center", ha="center")
  
      fig.tight_layout()
      return fig
code_tokens: def repartition_bar_chart_image_creator ( label2counts : Dict [ int , List [ int ] ] , counters : List [ int ] , colors : Union [ ndarray , Iterable , int , float ] = SEABORN_COLORS , ) : fig , ax = plt . subplots ( ) ax : Axes y = - arange ( len ( label2counts ) ) labels , counts = zip ( * ( ( label , c [ - 1 ] ) for label , c in label2counts . items ( ) ) ) total = sum ( counts ) ax . barh ( y , width = counts , color = colors ) ax . set_yticks ( y ) ax . set_yticklabels ( labels ) ax . set_xlabel ( "Number of exemplars" ) ax . set_ylabel ( "Class" ) for i , count in enumerate ( counts ) : ax . text ( count / 2 , - i , f"{count/total:.1%}" , va = "center" , ha = "center" ) fig . tight_layout ( ) return fig
short_docstring: Create a bar chart representing the labels repartition.
short_docstring_tokens: Create a bar chart representing the labels repartition .
comment: """
      Create a bar chart representing the labels repartition.
  
      :param label2counts: A dict holding the counts for each label, of the form
          {label: [count_at_step_0, count_at_step_1, ...]}. Only the last count of
          each label is used here.
      :param counters: (unused) The steps the counts were taken at.
      :param colors: The colors to use in the chart.
      """