code: def reverse_dict(d):
      """Reverses direction of dependence dict
  
      >>> d = {'a': (1, 2), 'b': (2, 3), 'c':()}
      >>> reverse_dict(d)  # doctest: +SKIP
      {1: ('a',), 2: ('a', 'b'), 3: ('b',)}
  
      :note: dict order are not deterministic. As we iterate on the
          input dict, it make the output of this function depend on the
          dict order. So this function output order should be considered
          as undeterministic.
  
      """
      result = {}
      for key in d:
          for val in d[key]:
              result[val] = result.get(val, ()) + (key,)
      return result
  
imports: from collections import OrderedDict
label_desc: Use image node_id 3 for calling a global function with example usage: reverse_dict(d) and returns: result