code: def apply_i_umlaut(stem: str):
      
      assert len(stem) > 0
      s_stem = s.syllabify_ssp(stem.lower())
      last_syllable = OldNorseSyllable(s_stem[-1], VOWELS, CONSONANTS)
      last_syllable.apply_i_umlaut()
      return "".join(s_stem[:-1]) + str(last_syllable)
docs: Changes the vowel of the last syllable of the given stem according to an i-umlaut.
  
      >>> apply_i_umlaut("mæl")
      'mæl'
      >>> apply_i_umlaut("lagð")
      'legð'
      >>> apply_i_umlaut("vak")
      'vek'
      >>> apply_i_umlaut("haf")
      'hef'
      >>> apply_i_umlaut("buð")
      'byð'
      >>> apply_i_umlaut("bár")
      'bær'
      >>> apply_i_umlaut("réð")
      'réð'
      >>> apply_i_umlaut("fór")
      'fœr'
  
      :param stem:
      :return: