code: def verify_consistency(predictions, scores, proba, opt_class):
      if predictions.shape != scores.shape:
          raise ValueError("predictions and scores arrays have inconsistent " +
                           "dimensions.")
      n_class = scores.shape[1] if scores.ndim > 1 else 1
      if proba is None:
          proba = np.repeat(False, n_class)
      if opt_class is None:
          opt_class = np.repeat(True, n_class)
      proba = np.array(proba, dtype=bool, ndmin=1)
      opt_class = np.array(opt_class, dtype=bool, ndmin=1)
      if np.sum(opt_class) < 1:
          raise ValueError("opt_class should contain at least one True value.")
      if predictions.shape[1] != len(proba):
          raise ValueError("mismatch in shape of proba and predictions.")
      if predictions.shape[1] != len(opt_class):
          raise ValueError("mismatch in shape of opt_class and predictions.")
      for m in range(n_class):
          if (np.any(np.logical_or(scores[:,m] < 0, scores[:,m] > 1)) and proba[m]):
              warnings.warn("scores fall outside the [0,1] interval for " +
                            "classifier {}. Setting proba[m]=False.".format(m))
              proba[m] = False
      return proba, opt_class