#NEWLINE# @ blueprint . route ( '/visualize-network' , methods = [ 'POST' ] ) #NEWLINE# def visualize_network( ) : #NEWLINE# #INDENT# '\n    Returns a visualization of the custom network as a string of PNG data\n    ' #NEWLINE# framework = flask . request . args . get ( 'framework' ) #NEWLINE# if ( not framework ) : #NEWLINE# #INDENT# raise werkzeug . exceptions . BadRequest ( 'framework not provided' ) #NEWLINE# #UNINDENT# fw = frameworks . get_framework_by_id ( framework ) #NEWLINE# ret = fw . get_network_visualization ( flask . request . form [ 'custom_network' ] ) #NEWLINE# return ret