<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_hierarchy(self, hierarchy):
 """ Sets an alternative sonority hierarchy, note that you will also need to specify the vowelset with the set_vowels, in order for the module to correctly identify each nucleus. The order of the phonemes defined is by decreased consonantality Example: ['fe', 'mi', 'na', 'rum'] """

        self.hierarchy = dict([(k, i) for i, j in enumerate(hierarchy) for k in j])