#NEWLINE# def _setup_sys_graph( self , group , connections ) : #NEWLINE# #INDENT# '\n        Set up dependency graph for systems in the Problem.\n\n        Returns\n        -------\n        nx.DiGraph\n            The system graph.\n\n        ' #NEWLINE# sgraph = nx . DiGraph ( ) #NEWLINE# sgraph . add_nodes_from ( ( s . pathname for s in group . subsystems ( recurse = True ) ) ) #NEWLINE# for ( target , ( source , idxs ) ) in iteritems ( connections ) : #NEWLINE# #INDENT# sgraph . add_edge ( source . rsplit ( '.' , 1 ) [ 0 ] , target . rsplit ( '.' , 1 ) [ 0 ] ) #NEWLINE# #UNINDENT# return sgraph