code: def compute_results(
      poison_scores, unpois_scores, pois_ct, alpha=0.05, threshold=None
  ):
      """
      Searches over thresholds for the best epsilon lower bound and accuracy.
      poison_scores: list of scores from poisoned models
      unpois_scores: list of scores from unpoisoned models
      pois_ct: number of poison points
      alpha: confidence parameter
      threshold: if None, search over all thresholds, else use given threshold
      """
      if threshold is None:  # search for best threshold
          all_thresholds = np.unique(poison_scores + unpois_scores)
      else:
          all_thresholds = [threshold]
  
      poison_arr = np.array(poison_scores)
      unpois_arr = np.array(unpois_scores)
  
      best_threshold, best_epsilon, best_acc = None, 0, 0
      for thresh in all_thresholds:
          epsilon, acc = compute_epsilon_and_acc(
              poison_arr, unpois_arr, thresh, alpha, pois_ct
          )
          if epsilon > best_epsilon:
              best_epsilon, best_threshold = epsilon, thresh
          best_acc = max(best_acc, acc)
      return best_threshold, best_epsilon, best_acc
  
file_path: privacy/research/audit_2020/audit.py
imports: import numpy
  from statsmodels.stats import proportion
  import attacks
label_desc: Use image node_id 1 for calling a global function with example usage: compute_results(poison_scores, unpois_scores, pois_ct, alpha, threshold) and returns: best_threshold,  best_epsilon,  best_acc