#NEWLINE# @ validate_target #NEWLINE# @ lock_host #NEWLINE# def state( self , target_id = 0 ) : #NEWLINE# #INDENT# '\n            Get the state of a given target.\n\n            `target_id` is a target ID (or None for the first target)\n            ' #NEWLINE# target = self . host . GetTargetAtIndex ( target_id ) #NEWLINE# state = self . host . StateAsCString ( target . process . GetState ( ) ) #NEWLINE# return state