nodes: 0, module; 1, function_definition; 2, function_name:reverse_dict; 3, parameters; 4, block; 5, identifier:dict_obj; 6, expression_statement; 7, expression_statement; 8, for_statement; 9, for_statement; 10, return_statement; 11, comment:"""Reverse a dict, so each value in it maps to a sorted list of its keys.
  
      Parameters
      ----------
      dict_obj : dict
          A key-value dict.
  
      Returns
      -------
      dict
          A dict where each value maps to a sorted list of all the unique keys
          that mapped to it.
  
      Example
      -------
      >>> dicti = {'a': 1, 'b': 3, 'c': 1}
      >>> reverse_dict(dicti)
      {1: ['a', 'c'], 3: ['b']}
      """; 12, assignment; 13, identifier:key; 14, identifier:dict_obj; 15, block; 16, identifier:key; 17, identifier:new_dict; 18, block; 19, identifier:new_dict; 20, identifier:new_dict; 21, dictionary; 22, expression_statement; 23, expression_statement; 24, call; 25, assignment; 26, identifier:add_to_dict_val_set; 27, argument_list; 28, subscript; 29, call; 30, keyword_argument; 31, keyword_argument; 32, keyword_argument; 33, identifier:new_dict; 34, identifier:key; 35, identifier:sorted; 36, argument_list; 37, identifier:dict_obj; 38, identifier:new_dict; 39, identifier:key; 40, subscript; 41, identifier:val; 42, identifier:key; 43, subscript; 44, keyword_argument; 45, identifier:dict_obj; 46, identifier:key; 47, identifier:new_dict; 48, identifier:key; 49, identifier:reverse; 50, False
code: def reverse_dict(dict_obj):
      """Reverse a dict, so each value in it maps to a sorted list of its keys.
  
      Parameters
      ----------
      dict_obj : dict
          A key-value dict.
  
      Returns
      -------
      dict
          A dict where each value maps to a sorted list of all the unique keys
          that mapped to it.
  
      Example
      -------
      >>> dicti = {'a': 1, 'b': 3, 'c': 1}
      >>> reverse_dict(dicti)
      {1: ['a', 'c'], 3: ['b']}
      """
      new_dict = {}
      for key in dict_obj:
          add_to_dict_val_set(dict_obj=new_dict, key=dict_obj[key], val=key)
      for key in new_dict:
          new_dict[key] = sorted(new_dict[key], reverse=False)
      return new_dict