def returnPreds(preds, threshold):
    """
    Return predicted binary values from prediction probabilities based on a given threshold

    Inputs:
        - preds: prediction probabilities
        - threshold: threshold for positive prediction value

    Output:
        - predicted_labels list of binary predicted labels based on threshold
    """
    predicted_labels = []
    for pred in preds:
        if pred >= threshold:
            predicted_labels.append(1)
        else:
            predicted_labels.append(0)

    return predicted_labels