take Lexicon.py from WMCore #1023