code: def test_format_labels():
      # test 1D labels
      str_labels = np.array(["b", "b", "a", "c", "a"])
      labels, label_map = format_labels(str_labels)
      assert all(labels == np.array([1, 1, 0, 2, 0]))
      assert label_map[0] == "a"
      assert label_map[1] == "b"
      assert label_map[2] == "c"
      assert_valid_class_labels(labels)
  
imports: from cleanlab.internal import util
  import numpy
  import pytest
  from cleanlab.internal.label_quality_utils import get_normalized_entropy
  from cleanlab.internal.multilabel_utils import int2onehot, onehot2int
  from cleanlab.internal.util import num_unique_classes, format_labels, get_missing_classes
  from cleanlab.internal.validation import assert_valid_class_labels
label_desc: Use image node_id 15 for calling a global function with example usage: test_format_labels() without return types