def get_values(stem, stem_short, stems_shortened_dic, stem_dic):
    """ Function: get_values()

        Purpose:  For a given stem, look up values in dictionary.     
                  Watch out for shortened stems.         
                  
        Input:    Stem and stem dictionaries.
        
        Return:   Values for stem in dictionary.

    """    
    if stem_short in stems_shortened_dic:    # Look up whether S1 is a shortened stem
        stack = stems_shortened_dic[stem_short][2]
        energy = stems_shortened_dic[stem_short][3]
    else:     
        stack = stem_dic[stem][2]
        energy = stem_dic[stem][3] 
  
    threshold = stem_dic[stem][3] 
  
    return threshold, stack, energy