def find_precision_at_recall(precision, recall, thresholds, recall_level=0.9):
    """ Returns the precision at a specified level of recall. The thresholds should go from 0 to 1.0

    Args:
        precision: List of precisions for each confidence
        recall: List of recalls for each confidence, paired with items in the `precision` list
        recall_level: A float between 0 and 1.0, the level of recall to retrieve precision at.

    Returns:
        precision at the specified recall_level
    """

    if precision is None or recall is None:
        print('precision or recall is None')
        return 0.0, 0.0

    for p, r, t in zip(precision, recall, thresholds):
        if r < recall_level:
            return p, t