def get_pred(probs, threshold=0.5):
    """
    get prediction from probs.
    """
    pred = []
    for p in probs:
        if p >= threshold:
            pred.append(1)
        else:
            pred.append(0)
    return pred