def compute_probability_from_prior(configurations, param_space, objective_weights):
    """
    Compute the probability of configurations being good according to the prior.
    :param configurations: list of configurations to compute probability.
    :param param_space: Space object for the optimization problem
    :param objective_weights: Objective weights for multi-objective optimization. Not implemented yet.
    :return: list with the probability of each configuration being good according to the prior.
    """
    probabilities = []
    objectives = param_space.get_optimization_parameters()
    input_param_objects = param_space.get_input_parameters_objects()

    prior_estimation_flag = param_space.get_estimate_prior_flags()[0]

    # We have to update this for multiple objectives
    if prior_estimation_flag:
        for configuration in configurations:
            probability = param_space.get_configuration_probability(configuration)
            probabilities.append(probability)
    else:
        for configuration in configurations:
            probability = 1
            for parameter_name in configuration.keys():
                for objective in objectives:
                    parameter_value = configuration[parameter_name]
                    p = input_param_objects[parameter_name].get_x_probability(parameter_value)
                    probability *= p**objective_weights[objective]
            probabilities.append(probability)

    return probabilities