code: def class_n_correct(prediction, y, significance):
      """Calculates the number of correct predictions made by a conformal
      classification model.
      """
      labels, y = np.unique(y, return_inverse=True)
      prediction = prediction > significance
      correct = np.zeros((y.size,), dtype=bool)
      for i, y_ in enumerate(y):
          correct[i] = prediction[i, int(y_)]
      return np.sum(correct)
  
file_path: lightwood/lightwood/analysis/nc/metrics.py
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: class_n_correct(prediction, y, significance) and returns: np