#NEWLINE# def __new__( cls , * args , **kwargs ) : #NEWLINE# #INDENT# inst = super ( _SpartsObject , cls ) . __new__ ( cls ) #NEWLINE# inst . counters = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for k in dir ( cls ) : #NEWLINE# #INDENT# v = getattr ( cls , k ) #NEWLINE# if isinstance ( v , ProvidesCounters ) : #NEWLINE# #INDENT# for ( cn , cv ) in v . _genCounterCallbacks ( ) : #NEWLINE# #INDENT# inst . counters [ cn ] = cv #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return inst