for n in graph.nodes():
attrs = {k: n[k] for k in n.attributeNames()}
attrs = str(attrs).replace(""", " ") // singlequote will be escaped by tensorboard
if any(i.uniqueName() not in scope.keys() for i in n.inputs()): // 0.3.1 workaround
continue
inputs = [replace(i.uniqueName(), scope) for i in n.inputs()]
outputnode = next(iter(n.outputs())) // FIXME: only first output is considered