def is_comp_node(graph, node):
    return 'comp' in graph.node.get(node, '')
Returns True for Component or PseudoComponent nodes.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/depgraph.py/is_comp_node