#NEWLINE# def histogram( self , key ) : #NEWLINE# #INDENT# '\n        Gets a histogram based on a key, creates a new one if it does not exist.\n\n        :param key: name of the metric\n        :type key: C{str}\n\n        :return: L{Histogram}\n        ' #NEWLINE# if ( self not in self . _histograms ) : #NEWLINE# #INDENT# self . _histograms [ key ] = Histogram ( clock = self . _clock ) #NEWLINE# #UNINDENT# return self . _histograms [ key ]