human
I am working on the file "Sessions/Session10/Day5/model_selection/model_comparison_tutorial.ipynb".
The first task is:
We can now do the following:
* plot a histogram of $T(\mathrm{mock~data})$
* compare that distribution with $T(\mathrm{real~data})$
* compute and report the p-value for $T(\mathrm{real~data})$
And we want all of that in packaged in functions of the model, so that we can re-use it later (on different models!). 
First let's write a function to compute the p-value, $P(T > T(y)|y,H)$:
Can you write Python program for it?
 ... Can you provide a Python program to compare that distribution with $T(\mathrm{real~data})$?
assistant
#Here is Python program to compare that distribution with $T(\mathrm{real~data})$
.

try:
    exec(open('solutions/pvalue.py').read())
except IOError:
    REMOVE_THIS_LINE()
    def pvalue(Model):
        """
        Compute the posterior predictive p-value, P(T > T(y)|y,H):
        """
        REPLACE_WITH_YOUR_SOLUTION()