def independent_probability(path):
    """
    This will compute the probability of a given path assuming temporal
    independence. This is then just the product of the volumes of the
    rectangles included in the path.

    Args:
        path (OneDimPath): The path taken for a given scenario
    Returns:
        float: The probability of the path
    """
    product = 1
    for interval in path.intervals:
        product *= interval.volume
    return product