Revert "Remove unused imports"

This reverts commit c2dfc806b15429afb8768cd8c6d2758f5d2d73a1.
Get last element of tuple in solr_entries

solr_entries are not a dictionary and values therefore cannot be
iterated over.
Mark celery import with NOQA so that it won't be a flakes error

Unfortunately celery is configured via an import. This needs to
be changed, but for now we'll settle for the "unused import"