But the issue is the .extend method (line right below, but still inside the loop) being applied to a generator.