#NEWLINE# @ react . connect ( 'plot' ) #NEWLINE# def plot_components( plot ) : #NEWLINE# #INDENT# from bokeh.embed import components #NEWLINE# ( script , div ) = components ( plot ) #NEWLINE# script = '\n' . join ( script . strip ( ) . split ( '\n' ) [ 1 : ( - 1 ) ] ) #NEWLINE# return ( script , div , plot . ref [ 'id' ] )