def _parse_expected_results(self, expected_results):
expected_nodes = dict()<EOL>expected_links = dict()<EOL>for bolt in expected_results["<STR_LIT>"]["<STR_LIT>"]:<EOL><INDENT>name = bolt["<STR_LIT>"]["<STR_LIT:name>"]<EOL>if name not in expected_links:<EOL><INDENT>expected_links[name] = set()<EOL><DEDENT>for input in bolt["<STR_LIT>"]:<EOL><INDENT>expected_links[name].add(input["<STR_LIT>"]["<STR_LIT>"])<EOL><DEDENT><DEDENT>for instance in expected_results["<STR_LIT>"]:<EOL><INDENT>name = instance["<STR_LIT:info>"]["<STR_LIT>"]<EOL>if name not in expected_nodes:<EOL><INDENT>expected_nodes[name] = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>expected_nodes[name] += <NUM_LIT:1><EOL><DEDENT><DEDENT>return  expected_nodes, expected_links<EOL>
Parse JSON file and generate expected_nodes and expected_links