def _get_instance_state(self):
instance = self._get_instance()<EOL>state = None<EOL>try:<EOL><INDENT>state = instance.state['<STR_LIT:Name>']<EOL><DEDENT>except Exception:<EOL><INDENT>raise EC2CloudException(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>instance_id=self.running_instance_id<EOL>)<EOL>)<EOL><DEDENT>return state<EOL>
Attempt to retrieve the state of the instance.
 Raises:
    EC2CloudException: If the instance cannot be found.