code: def _create_text_labels(classes: List[str], scores: List[float]):
      """
      Create the label tags for visualization
      Parameters
      ----------
      classes (list[str]): class names for all the detected instances
      scores (list[float]); detection confidence scores for all the detected instances
  
      Returns
      -------
      labels (list[str]): label tags for visualization
      """
      labels = None
      if classes is not None:
          labels = classes
  
      if scores is not None:
          if labels is None:
              labels = ["{:.0f}%".format(s * 100) for s in scores]
          else:
              labels = [
                  "{} {:.0f}%".format(l, s * 100)
                  for l, s in zip(labels, scores)
              ]
      return labels
  
imports: import collections
  import colorsys
  import logging
  import re
  from enum import Enum, unique
  from typing import List
  import matplotlib
  import matplotlib.colors
  import matplotlib.figure
  import matplotlib.pyplot
  import numpy
  import pandas
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from PIL import Image
  from .colormap import random_color
  from .misc import merge_spans
label_desc: Use image node_id 1 for calling a global function with example usage: _create_text_labels(classes, scores) and returns: labels