add python implementation of singleton class