Get probability of parameter given new data

I have been digging in the code you have given and there is some points I have not fully understood.

Basically, the idea is to evaluate for each component the Expectation of P(y_{new} | w=w_i).
For that we are using the _comp_logp function that is returning in our case the two components of the mixture loglikelihood defined by y_obs.
To evaluate the expectation we are using the posterior distribution of the parameters from the trace through two nested for loops.
What I am not understanding is why do we drop sigma and w variables from the trace point when evaluating f_complogp. What seems like some magic to me at this point is that the definition of this function seems to request such a drop “by default”…

Thank you in advance.