result_str = '\n'.join([entity['words'] for entity in result_dict['words_result']]) KeyError: 'words_result'