#NEWLINE# def rewrite_single_shorthand_state_decl( data ) : #NEWLINE# #INDENT# '\n    Rewrite all state declarations that look like this::\n\n      state_id_decl:\n        state.func\n\n    into::\n\n      state_id_decl:\n        state.func: []\n    ' #NEWLINE# for ( sid , states ) in six . iteritems ( data ) : #NEWLINE# #INDENT# if isinstance ( states , six . string_types ) : #NEWLINE# #INDENT# data [ sid ] = { #NEWLINE# #INDENT# states : [ ] , #NEWLINE# #UNINDENT# }