#NEWLINE# def get_sample_value( self , name , labels = None ) : #NEWLINE# #INDENT# 'Returns the sample value, or None if not found.\n\n        This is inefficient, and intended only for use in unittests.\n        ' #NEWLINE# if ( labels is None ) : #NEWLINE# #INDENT# labels = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# for metric in self . collect ( ) : #NEWLINE# #INDENT# for ( n , l , value ) in metric . samples : #NEWLINE# #INDENT# if ( ( self == name ) and ( l == labels ) ) : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return None