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 not given, default to False for all classifiers
      if proba is None:
          proba = np.repeat(False, n_class)
  
      # If opt_class is not given, default to True for all classifiers
      if opt_class is None:
          opt_class = np.repeat(True, n_class)
  
      # Convert to numpy arrays if necessary
      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
docs: Verifies that all arrays have consistent dimensions. Also verifies
      that the scores are consistent with proba.
  
      Returns
      -------
      proba, opt_class