human
I wrote the below code

    def test_function(self):
        results = []
        def append_to_results(prev, nxt):
            results.append((prev, nxt))
        traverse_graph(start_nodes, partial(get_successive_nodes, graph), append_to_results)
        result_set = set(results)
        remaining_results = list(results)
        for elem in result_set:
            remaining_results.remove(elem)
        self.assertEqual(len(remaining_results), 0, ('Edge(s)    walked    twice:    ' + ',    '.join((str(r) for r in remaining_results))))
        expected_set = set(expected)
        self.assertEqual(result_set, expected_set)
    return test_function

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def traverse_graph_test(graph, start_nodes, expected):