code: def reverse_dict(d):
      """
      >>> a, b, c = 'abc'
      >>> d = {a: [b, c], b: [c]}
      >>> dd = reverse_dict(d)
      >>> from pprint import pprint
      >>> pprint({k: sorted(v) for k, v in dd.items()})
      {'a': [], 'b': ['a'], 'c': ['a', 'b']}
      """
      result = defaultdict(set)
      _add = set.add
      for k, vals in d.items():
          result[k]
          for val in vals:
              _add(result[val], k)
      result.default_factory = None
      return result
  
imports: from collections import defaultdict
  from typing import List, Sequence
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 10 for calling a global function with example usage: reverse_dict(d) and returns: result