nodes: 0, module; 1, function_definition; 2, function_name:dict_stack; 3, parameters; 4, block; 5, identifier:dict_list; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, for_statement; 10, expression_statement; 11, return_statement; 12, identifier:key_prefix; 13, string; 14, comment:r"""
      stacks values from two dicts into a new dict where the values are list of
      the input values. the keys are the same.
  
      DEPRICATE in favor of dict_stack2
  
      Args:
          dict_list (list): list of dicts with similar keys
  
      Returns:
          dict dict_stacked
  
      CommandLine:
          python -m utool.util_dict --test-dict_stack
          python -m utool.util_dict --test-dict_stack:1
  
      Example:
          >>> # ENABLE_DOCTEST
          >>> from utool.util_dict import *  # NOQA
          >>> import utool as ut
          >>> dict1_ = {'a': 1, 'b': 2}
          >>> dict2_ = {'a': 2, 'b': 3, 'c': 4}
          >>> dict_stacked = dict_stack([dict1_, dict2_])
          >>> result = ut.repr2(dict_stacked, sorted_=True)
          >>> print(result)
          {'a': [1, 2], 'b': [2, 3], 'c': [4]}
  
      Example1:
          >>> # ENABLE_DOCTEST
          >>> from utool.util_dict import *  # NOQA
          >>> import utool as ut
          >>> # Get equivalent behavior with dict_stack2?
          >>> # Almost, as long as None is not part of the list
          >>> dict1_ = {'a': 1, 'b': 2}
          >>> dict2_ = {'a': 2, 'b': 3, 'c': 4}
          >>> dict_stacked_ = dict_stack2([dict1_, dict2_])
          >>> dict_stacked = {key: ut.filter_Nones(val) for key, val in dict_stacked_.items()}
          >>> result = ut.repr2(dict_stacked, sorted_=True)
          >>> print(result)
          {'a': [1, 2], 'b': [2, 3], 'c': [4]}
      """; 15, assignment; 16, identifier:dict_; 17, identifier:dict_list; 18, block; 19, assignment; 20, identifier:dict_stacked; 21, identifier:dict_stacked_; 22, call; 23, for_statement; 24, identifier:dict_stacked; 25, call; 26, identifier:defaultdict; 27, argument_list; 28, pattern_list; 29, call; 30, block; 31, identifier:dict; 32, argument_list; 33, identifier:list; 34, identifier:key; 35, identifier:val; 36, attribute; 37, argument_list; 38, expression_statement; 39, identifier:dict_stacked_; 40, identifier:six; 41, identifier:iteritems; 42, identifier:dict_; 43, call; 44, attribute; 45, argument_list; 46, subscript; 47, identifier:append; 48, identifier:val; 49, identifier:dict_stacked_; 50, binary_operator:key_prefix + key; 51, identifier:key_prefix; 52, identifier:key
code: def dict_stack(dict_list, key_prefix=''):
      r"""
      stacks values from two dicts into a new dict where the values are list of
      the input values. the keys are the same.
  
      DEPRICATE in favor of dict_stack2
  
      Args:
          dict_list (list): list of dicts with similar keys
  
      Returns:
          dict dict_stacked
  
      CommandLine:
          python -m utool.util_dict --test-dict_stack
          python -m utool.util_dict --test-dict_stack:1
  
      Example:
          >>> # ENABLE_DOCTEST
          >>> from utool.util_dict import *  # NOQA
          >>> import utool as ut
          >>> dict1_ = {'a': 1, 'b': 2}
          >>> dict2_ = {'a': 2, 'b': 3, 'c': 4}
          >>> dict_stacked = dict_stack([dict1_, dict2_])
          >>> result = ut.repr2(dict_stacked, sorted_=True)
          >>> print(result)
          {'a': [1, 2], 'b': [2, 3], 'c': [4]}
  
      Example1:
          >>> # ENABLE_DOCTEST
          >>> from utool.util_dict import *  # NOQA
          >>> import utool as ut
          >>> # Get equivalent behavior with dict_stack2?
          >>> # Almost, as long as None is not part of the list
          >>> dict1_ = {'a': 1, 'b': 2}
          >>> dict2_ = {'a': 2, 'b': 3, 'c': 4}
          >>> dict_stacked_ = dict_stack2([dict1_, dict2_])
          >>> dict_stacked = {key: ut.filter_Nones(val) for key, val in dict_stacked_.items()}
          >>> result = ut.repr2(dict_stacked, sorted_=True)
          >>> print(result)
          {'a': [1, 2], 'b': [2, 3], 'c': [4]}
      """
      dict_stacked_ = defaultdict(list)
      for dict_ in dict_list:
          for key, val in six.iteritems(dict_):
              dict_stacked_[key_prefix + key].append(val)
      dict_stacked = dict(dict_stacked_)
      return dict_stacked