Python sample code