code: def class_one_err_one_class(prediction, y, significance, c=0):
      """Calculates the error rate of conformal classifier predictions containing
      only a single output label. Considers only test examples belonging to
      class ``c``. Use ``functools.partial`` in order to test other classes.
      """
      labels, y = np.unique(y, return_inverse=True)
      prediction = prediction > significance
      idx = np.arange(0, y.size, 1)
      idx = filter(lambda x: prediction[x, c], idx)
      idx = filter(lambda x: np.sum(prediction[x, :]) == 1, idx)
      errors = filter(lambda x: int(y[x]) != c, idx)
  
      if len(idx) > 0:
          return np.size(errors) / np.size(idx)
      else:
          return 0
  
file_path: lightwood/lightwood/analysis/nc/metrics.py
imports: import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: class_one_err_one_class(prediction, y, significance, c) and returns: unknown, int