Added state pattern sample for python