def wait_for_result(self, psd_state):
if len(psd_state['<STR_LIT>']) > <NUM_LIT:1>:<EOL><INDENT>concurrent.futures.wait(psd_state['<STR_LIT>'])<EOL><DEDENT>elif psd_state['<STR_LIT>']:<EOL><INDENT>psd_state['<STR_LIT>'][<NUM_LIT:0>].result()<EOL><DEDENT>return self.result(psd_state)<EOL>
Wait for all PSD threads to finish and return result