def update_session_plot_options(**kwargs):
 for key in kwargs:
  if (key not in PLOT_OPTIONS):
   raise exceptions.PlotlyError('{} is not a valid config or plot option key'.format(key))
  if (not isinstance(kwargs[key], PLOT_OPTIONS[key])):
   raise exceptions.PlotlyError("{} must be of type '{}'".format(key, PLOT_OPTIONS[key]))
  if ((key == 'sharing') and (not (kwargs[key] in SHARING_OPTIONS))):
   raise exceptions.PlotlyError("'{0}' must be of either '{1}', '{2}' or '{3}'".format(key, *SHARING_OPTIONS))
 _session['plot_options'].update(kwargs)

def update_session_plot_options ( ** kwargs ) : for key in kwargs : if ( key not in PLOT_OPTIONS ) : raise exceptions . PlotlyError ( '{} is not a valid config or plot option key' . format ( key ) ) if ( not isinstance ( kwargs [ key ] , PLOT_OPTIONS [ key ] ) ) : raise exceptions . PlotlyError ( "{} must be of type '{}'" . format ( key , PLOT_OPTIONS [ key ] ) ) if ( ( key == 'sharing' ) and ( not ( kwargs [ key ] in SHARING_OPTIONS ) ) ) : raise exceptions . PlotlyError ( "'{0}' must be of either '{1}', '{2}' or '{3}'" . format ( key , * SHARING_OPTIONS ) ) _session [ 'plot_options' ] . update ( kwargs )
update the _session plot_options .