def compute_h_score(shed_words_freq_dict, shed_words_happs_dict, verbose=False):
    """
    Compute the happiness score given a shed_words_freq_dict and a shed_words_freq_dict
    
    param shed_words_freq_dict: dict of shed_word_ind to shed_word_freq mapping
    param shed_words_happs_dict: dict of shed_word_ind to shed_word_happs mapping
    
    return: a single happiness score
    """
    total_len = sum(shed_words_freq_dict.values())
    if verbose:
        print('(FUNC) LEN: {}'.format(total_len))
    
    # intermediate dict for each shed word contribution to the last total happiness score
    shed_words_contri_dict = {shed_word_ind: (shed_words_happs_dict[shed_word_ind] * (shed_words_freq / total_len)) 
                              for shed_word_ind, shed_words_freq in list(shed_words_freq_dict.items())}
    if verbose:
        print('(FUNC) SHED WORDS CONTRIBUTIONS: {}'.format(shed_words_contri_dict))
    
    h_score = sum(shed_words_contri_dict.values())
    
    return h_score