causes [Errno 57] Socket is not connected error on multiple calls (at least on OSX). You can "fix" this by removing the shutdown code in ner/utils, but perhaps it should be addressed more methodically.