code: def _draw_labels(ax, rect, label, edgecolor):
      """Helper function to draw labels on an axis."""
  
      rx, ry = rect.get_xy()
      c_xleft = rx + 10
      c_xright = rx + rect.get_width() - 10
      c_ytop = ry + 12
  
      if edgecolor == "r":
          cx, cy = c_xleft, c_ytop
      else:  # edgecolor == b
          cx, cy = c_xright, c_ytop
  
      l = ax.annotate(
          label,
          (cx, cy),
          fontsize=8,
          fontweight="bold",
          color="white",
          ha="center",
          va="center",
      )
      l.set_bbox(
          dict(
              facecolor=edgecolor,
              alpha=0.35,
              edgecolor=edgecolor,
              pad=2,
          )
      )
      return ax
  
imports: from multiprocessing import Pool
  from typing import Optional, Any, Dict, Tuple, Union, List, TYPE_CHECKING, TypeVar, DefaultDict
  import numpy
  import collections
  from cleanlab.internal.constants import MAX_CLASS_TO_SHOW, ALPHA, EPSILON, TINY_VALUE
  from cleanlab.object_detection.filter import _filter_by_class, _calculate_true_positives_false_positives
  from cleanlab.object_detection.rank import _get_valid_inputs_for_compute_scores, _separate_prediction, _separate_label, _get_prediction_type
  from cleanlab.internal.object_detection_utils import bbox_xyxy_to_xywh
label_desc: Use image node_id 16 for calling a global function with example usage: _draw_labels(ax, rect, label, edgecolor) and returns: ax