here is the official recipe for older python
http://code.activestate.com/recipes/576611/
I can add it in statsmodels.npcompat in the same way as OrderedDict, so it's available whenever we need it.