<s> import logging <EOL> log = logging . getLogger ( '<STR_LIT>' ) <EOL> def singleton ( cls ) : <EOL> """<STR_LIT>""" <EOL> instances = { } <EOL> def instance ( ) : <EOL> if cls not in instances : <EOL> instances [ cls ] = cls ( ) <EOL> log . debug ( "<STR_LIT>" % cls ) <EOL> return instances [ cls ] <EOL> return instance </s>
