End Code Function Python Example Using Rpi5