input: Write a python function to calculate the accuracy of a RandomForestClassifier model given the predicted probabilities and true labels.
  assert calculate_accuracy([0.9, 0.8, 0.4], [1, 1, 0])==1.0
  assert calculate_accuracy([0.9, 0.2, 0.6], [1, 0, 1])==1.0
  assert calculate_accuracy([0.5, 0.4, 0.7], [1, 0, 1])==0.6666666666666666
output: def calculate_accuracy(predicted_probabilities, true_labels):
      predicted_labels = [1 if prob >= 0.5 else 0 for prob in predicted_probabilities]
      correct_predictions = sum(p == t for p, t in zip(predicted_labels, true_labels))
      return correct_predictions / len(true_labels)