def get_graph(self, components_only=False, format='json'):
        ''' returns cleaned up graph data in the selected format

            components_only: (optional) boolean
                if True, only components will be included in the graph
                otherwise the full dependency graph will be returned

            format: (optional) string
                json - returns serialized graph data in JSON format
                svg  - returns scalable vector graphics rendition of graph
        '''
        if components_only:
            graph = self._depgraph.component_graph()
        else:
            graph = _clean_graph(self._depgraph)

        if format.lower() == 'json':
            graph_data = json_graph.node_link_data(graph)
            return json.dumps(graph_data)
        elif format.lower() == 'svg':
            agraph = nx.to_agraph(graph)
            return agraph.draw(format='svg', prog='dot')
        else:
            self.raise_exception(format % "'%s' is not a supported graph data format")
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/assembly.py/Assembly.get_graph/swapped operands of `%`