code: def make_data(
      means=[[3, 2], [7, 7], [0, 8]],
      covs=[
          [[5, -1.5], [-1.5, 1]],
          [[1, 0.5], [0.5, 4]],
          [[5, 1], [1, 5]],
      ],
      sizes=[80, 40, 40],
      avg_trace=0.8,
      seed=1,  # set to None for non-reproducible randomness
  ):
      np.random.seed(seed=seed)
  
      m = len(means)  # number of classes
      n = sum(sizes)
      local_data = []
      labels = []
      test_data = []
      test_labels = []
  
      for idx in range(m):
          local_data.append(
              np.random.multivariate_normal(
                  mean=means[idx], cov=covs[idx], size=sizes[idx]
              )
          )
          test_data.append(
              np.random.multivariate_normal(
                  mean=means[idx], cov=covs[idx], size=sizes[idx]
              )
          )
          labels.append(np.array([idx for i in range(sizes[idx])]))
          test_labels.append(np.array([idx for i in range(sizes[idx])]))
      X_train = np.vstack(local_data)
      true_labels_train = np.hstack(labels)
      X_test = np.vstack(test_data)
      true_labels_test = np.hstack(test_labels)
  
      # Compute p(true_label=k)
      py = np.bincount(true_labels_train) / float(
          len(true_labels_train)
      )
  
      noise_matrix = generate_noise_matrix_from_trace(
          m,
          trace=avg_trace * m,
          py=py,
          valid_noise_matrix=True,
          seed=seed,
      )
  
      # Generate our noisy labels using the noise_matrix.
      s = generate_noisy_labels(true_labels_train, noise_matrix)
      ps = np.bincount(s) / float(len(s))
  
      # Compute inverse noise matrix
      inv = count.compute_inv_noise_matrix(py, noise_matrix, ps=ps)
  
      # Estimate pred_probs
      latent = count.estimate_py_noise_matrices_and_cv_pred_proba(
          X=X_train,
          labels=s,
          cv_n_folds=3,
      )
  
      label_errors_mask = s != true_labels_train
  
      return {
          "X_train": X_train,
          "true_labels_train": true_labels_train,
          "X_test": X_test,
          "true_labels_test": true_labels_test,
          "labels": s,
          "label_errors_mask": label_errors_mask,
          "ps": ps,
          "py": py,
          "noise_matrix": noise_matrix,
          "inverse_noise_matrix": inv,
          "est_py": latent[0],
          "est_nm": latent[1],
          "est_inv": latent[2],
          "cj": latent[3],
          "pred_probs": latent[4],
          "m": m,
          "n": n,
      }
  
imports: import numpy
  import pytest
  from cleanlab import rank
  from cleanlab.internal.label_quality_utils import _subtract_confident_thresholds
  from cleanlab.benchmarking.noise_generation import generate_noise_matrix_from_trace
  from cleanlab.benchmarking.noise_generation import generate_noisy_labels
  from cleanlab import count
  from cleanlab import outlier
  from sklearn.neighbors import NearestNeighbors
label_desc: Use image node_id 1 for calling a global function with example usage: make_data(means, covs, sizes, avg_trace, seed) and returns: dict