I want to convert predicted probabilities to label 0 or 1 using threshold value 0.6 instead of 0.5 i.e. if the probability is >0.6, class label 1, otherwise 0. How can I do it?

E.g.

pred_probs = [0.12,0.34,0.54,0.98,0.67,0.21,0.43,0.47,0.78,0.90]

E.g.

pred_probs = [0.12,0.34,0.54,0.98,0.67,0.21,0.43,0.47,0.78,0.90]