APY-31: Update the code from Ally-Py tutorial

* some initial preparation and sample code