def merge_metadata(g, nodes):
    meta = {}
    for n in nodes:
        m = g.node[n]
        meta.update(m)
        io = m.get('iotype')
        if io == 'state':
            meta['state'] = True
        elif io == 'residual':
            meta['residual'] = True
    return meta
Return a combined metadata dict for the given set of
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/depgraph.py/merge_metadata