code: def test_reverse_dict():
      d = {"a": (1, 2), "b": (2, 3), "c": ()}
      # Python 3.3 enable by default random hash for dict.
      # This change the order of traversal, so this can give 2 outputs
      assert reverse_dict(d) == {
          1: ("a",),
          2: ("a", "b"),
          3: ("b",),
      } or reverse_dict(d) == {1: ("a",), 2: ("b", "a"), 3: ("b",)}
  
file_path: Theano/theano/gof/tests/test_sched.py
imports: from __future__ import absolute_import, print_function, division
  from theano.gof.sched import make_dependence_cmp, sort_apply_nodes, reverse_dict, _toposort, posort
  from theano import tensor
  from theano.gof.graph import io_toposort
  from theano.compat import cmp
label_desc: Use image node_id 3 for calling a global function with example usage: test_reverse_dict() without return types