def add_tooltips_columns(renderer, tooltips, group):
 current_columns = renderer.data_source.data.keys()
 if isinstance(tooltips[0], tuple):
  tooltips_columns = [pair[1].replace('@', '') for pair in tooltips]
 elif isinstance(tooltips[0], str):
  tooltips_columns = tooltips
 else:
  tooltips_columns = []
 for column in tooltips_columns:
  if (column in current_columns):
   continue
  elif ('$' in column):
   continue
  renderer.data_source.add(group.get_values(column), column)
 return renderer

def add_tooltips_columns ( renderer , tooltips , group ) : current_columns = renderer . data_source . data . keys ( ) if isinstance ( tooltips [ 0 ] , tuple ) : tooltips_columns = [ pair [ 1 ] . replace ( '@' , '' ) for pair in tooltips ] elif isinstance ( tooltips [ 0 ] , str ) : tooltips_columns = tooltips else : tooltips_columns = [ ] for column in tooltips_columns : if ( column in current_columns ) : continue elif ( '$' in column ) : continue renderer . data_source . add ( group . get_values ( column ) , column ) return renderer
args: renderer : renderer for the glyph to be modified .