#NEWLINE# def collect( self ) : #NEWLINE# #INDENT# 'Yields metrics from the collectors in the registry.' #NEWLINE# collectors = None #NEWLINE# with metric . _lock : #NEWLINE# #INDENT# collectors = copy . copy ( self . _collectors ) #NEWLINE# #UNINDENT# for collector in collectors : #NEWLINE# #INDENT# for metric in collector . collect ( ) : #NEWLINE# #INDENT# ( yield metric )