def get_probability(distribution, element, n=100):
    """Utility function to get the probability of a specific element from a scikit-decide distribution
    (based on sampling if this distribution is not a DiscreteDistribution)."""
    p = 0
    for i in range(n):
        x = distribution.sample()
        if x == element:
            p += 1
    return p / n
