#NEWLINE# @ classmethod #NEWLINE# def wrap( cls , obj ) : #NEWLINE# #INDENT# if ( obj . get ( 'chart_id' ) is None ) : #NEWLINE# #INDENT# obj [ 'chart_id' ] = ( ( obj . get ( 'title' ) or '' ) + str ( hash ( json . dumps ( sorted ( obj . items ( ) ) ) ) ) ) #NEWLINE# #UNINDENT# return super ( ChartSpec , cls ) . wrap ( obj )