updating python example for adding tags