Model definition inside of a function - pymc3.gp.Marginal not recognized

Try return toy_model, gp in the function return.