Add graph attribute on StateMachine

Fix #30
Thanks.