<s> import sys <EOL> from zope . interface . advice import addClassAdvisor <EOL> from zope . interface . advice import getFrameInfo <EOL> my_globals = globals ( ) <EOL> def ping ( log , value ) : <EOL> def pong ( klass ) : <EOL> log . append ( ( value , klass ) ) <EOL> return [ klass ] <EOL> addClassAdvisor ( pong ) <EOL> try : <EOL> from types import ClassType <EOL> class ClassicClass : <EOL> __metaclass__ = ClassType <EOL> classLevelFrameInfo = getFrameInfo ( sys . _getframe ( ) ) <EOL> except ImportError : <EOL> ClassicClass = None <EOL> class NewStyleClass : <EOL> __metaclass__ = type <EOL> classLevelFrameInfo = getFrameInfo ( sys . _getframe ( ) ) <EOL> moduleLevelFrameInfo = getFrameInfo ( sys . _getframe ( ) ) </s>
