Here’s an example notebook with a few ways to implement the correlated Poisson model. There’s more discussion on this thread which is essentially the same topic:
There’s a lot to unpack in that example notebook - feel free to call out specific parts that you’d like explained.