I ported the code to WMCore.
import statement need to be changed to 

from WMCore.Database.CMSCouch import CouchServer