Add Python implementation of simulation example