code: def labels(self, lab):
      np.random.seed(SEED)
      K = lab.get_info("statistics")["num_classes"]
      N = lab.get_info("statistics")["num_examples"] * 20
      labels = np.random.choice(
          np.arange(K - 1), size=N, p=[0.5] * (K - 1)
      )
      labels[0] = K - 1  # Rare class
      return labels
  
file_path: cleanlab/tests/datalab/issue_manager/test_imbalance.py
imports: import numpy
  import pytest
  from cleanlab.datalab.internal.issue_manager.imbalance import ClassImbalanceIssueManager
label_desc: Use image node_id 1 for calling the TestClassImbalanceIssueManager obj's underlying member method code with example usage: obj.labels(lab) and returns: labels