code: def groups(many_to_one):
      """Converts a many-to-one mapping into a one-to-many mapping.
  
      `many_to_one` must be a dictionary whose keys and values are all
      :term:`hashable`.
  
      The return value is a dictionary mapping values from `many_to_one`
      to sets of keys from `many_to_one` that have that value.
  
      Examples
      --------
      >>> from networkx.utils import groups
      >>> many_to_one = {"a": 1, "b": 1, "c": 2, "d": 3, "e": 3}
      >>> groups(many_to_one)  # doctest: +SKIP
      {1: {'a', 'b'}, 2: {'c'}, 3: {'e', 'd'}}
      """
      one_to_many = defaultdict(set)
      for v, k in many_to_one.items():
          one_to_many[k].add(v)
      return dict(one_to_many)
  
imports: import sys
  import uuid
  import warnings
  from collections import defaultdict, deque
  from collections.abc import Iterable, Iterator, Sized
  from itertools import chain, tee
  import networkx
label_desc: Use image node_id 8 for calling a global function with example usage: groups(many_to_one) and returns: dict