@artifex Great question, I can also confirm that it is possible, but I also can’t find any code. I found something related in the NuPIC code comments, perhaps you can find a lead here until someone else has something better.
Edit: Also found this thread, in which I see pictures of both prediction/anomaly happening, with code: