code: def num_unique_classes(labels, multi_label=None) -> int:
      """Finds the number of unique classes for both single-labeled
      and multi-labeled labels. If multi_label is set to None (default)
      this method will infer if multi_label is True or False based on
      the format of labels.
      This allows for a more general form of multiclass labels that looks
      like this: [1, [1,2], [0], [0, 1], 2, 1]"""
      return len(get_unique_classes(labels, multi_label))
  
imports: import warnings
  import numpy
  import pandas
  from typing import Union, Tuple
  from cleanlab.typing import DatasetLike, LabelLike
  from cleanlab.internal.validation import labels_to_array
  from cleanlab.internal.constants import FLOATING_POINT_COMPARISON, TINY_VALUE
label_desc: Use image node_id 27 for calling a global function with example usage: num_unique_classes(labels, multi_label) and returns: len