code: def _autolabel(ax, rects, is_percent=True):
      """Attach a text label above each bar in *rects*, displaying its height."""
      for rect in rects:
          height = rect.get_height()
          if (
              is_percent and height > 0 and height <= 1
          ):  # for percent values
              text_label = "{:2.0f}".format(height * 100)
          else:
              text_label = "{:2.0f}".format(height)
          ax.annotate(
              text_label,
              xy=(rect.get_x() + rect.get_width() / 2, height),
              xytext=(0, 3),  # 3 points vertical offset
              textcoords="offset points",
              ha="center",
              va="bottom",
              fontsize="x-small",
          )
  
file_path: sahi/sahi/scripts/coco_error_analysis.py
imports: import copy
  import os
  from multiprocessing import Pool
  from pathlib import Path
  from typing import List
  import fire
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: _autolabel(ax, rects, is_percent) without return types