Move some imports to the __iter__ method. These imports were interfering with the coverage reports.