def METHOD_NAME(y_label, y_score):
    # y denotes groundtruth scores,
    # y_score denotes the prediction scores.
    from scipy.optimize import brentq
    from sklearn.metrics import roc_curve
    from scipy.interpolate import interp1d
    fpr, tpr, thresholds = roc_curve(y_label, y_score, pos_label=1)
    eer = brentq(lambda x : 1. - x - interp1d(fpr, tpr)(x), 0., 1.)
    optimal_threshold = interp1d(fpr, thresholds)(eer)
    return eer, optimal_threshold