code: def draw_labels(self, label: str, box: np.ndarray, color: np.ndarray):
      x0, y0, x1, y1 = box
      text_pos = (x0, y0)
      instance_area = (y1 - y0) * (x1 - x0)
      small = _SMALL_OBJ * self.scale
      if instance_area < small or y1 - y0 < 40 * self.scale:
          if y1 >= self.height - 5:
              text_pos = (x1, y0)
          else:
              text_pos = (x0, y1)
  
      height_ratio = (y1 - y0) / np.sqrt(self.height * self.width)
      lighter_color = self._change_color_brightness(
          color, brightness_factor=0.7
      )
      font_size = np.clip((height_ratio - 0.02) / 0.08 + 1, 1.2, 2)
      font_size *= 0.75 * self.font_size
  
      self.draw_text(text=label, position=text_pos, color=lighter_color)
  
imports: import colorsys
  import io
  import os
  from typing import Union
  import matplotlib
  import matplotlib.colors
  import matplotlib.figure
  import numpy
  import requests
  import torch
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from mmf.datasets.processors.frcnn_processor import img_tensorize
  from PIL import Image
label_desc: Use image node_id 4 for calling the SingleImageViz obj's underlying member method code with example usage: obj.draw_labels(label, box, color) without return types