#NEWLINE# def build_agg_tooltip( hover_text = None , agg_text = None , aggregated_col = None ) : #NEWLINE# #INDENT# 'Produce a consistent tooltip based on available chart configuration.\n\n    Args:\n        hover_text (str, optional): the desired label for the value to be shown in the\n            tooltip\n        agg_text (str, optional): any aggregation text used for the chart\n        aggregated_col (str, optional): any column name used for aggregation\n\n    Returns:\n        tuple(str, str): a single tooltip\n\n    ' #NEWLINE# if ( hover_text is None ) : #NEWLINE# #INDENT# if ( agg_text is None ) : #NEWLINE# #INDENT# if isinstance ( aggregated_col , str ) : #NEWLINE# #INDENT# hover_text = aggregated_col #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# hover_text = 'value' #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# hover_text = agg_text #NEWLINE# if isinstance ( aggregated_col , str ) : #NEWLINE# #INDENT# hover_text = ( '%s of %s' % ( hover_text , aggregated_col ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ( hover_text . title ( ) , '@values' )