#NEWLINE# def __init__( self , name , documentation , buckets = None , sum_value = None , labels = None ) : #NEWLINE# #INDENT# Metric . __init__ ( self , name , documentation , 'histogram' ) #NEWLINE# if ( ( sum_value is None ) != ( buckets is None ) ) : #NEWLINE# #INDENT# raise ValueError ( 'buckets and sum_value must be provided together.' ) #NEWLINE# #UNINDENT# if ( ( labels is not None ) and ( buckets is not None ) ) : #NEWLINE# #INDENT# raise ValueError ( 'Can only specify at most one of buckets and labels.' ) #NEWLINE# #UNINDENT# if ( labels is None ) : #NEWLINE# #INDENT# labels = [ ] #NEWLINE# #UNINDENT# self . _labelnames = labels #NEWLINE# if ( buckets is not None ) : #NEWLINE# #INDENT# self . add_metric ( [ ] , buckets , sum_value )