<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def roulette_selection(population, fitnesses):
 """Create a list of parents with roulette selection."""

    probabilities = _fitnesses_to_probabilities(fitnesses)

    intermediate_population = []
    for _ in range(len(population)):
        # Choose a random individual
        selection = random.uniform(0.0, 1.0)
        # Iterate over probabilities list
        for i, probability in enumerate(probabilities):
            if probability >= selection:  # First probability that is greater
                intermediate_population.append(population[i])
                break

    return intermediate_population