code: def stem(word: str) -> str:
      """
      Stem a word of Old French.
  
      >>> stem('departissent')
      'depart'
      >>> stem('talent')
      'talent'
  
      """
      word = word.lower()
  
      """remove the simple endings from the target word"""
      stemmed_word, was_stemmed = _matchremove_noun_endings(word)
  
      """if word didn't match the simple endings, try verb endings"""
      if not was_stemmed:
          stemmed_word = _matchremove_verb_endings(word)
  
      return stemmed_word
  
label_desc: Use image node_id 3 for calling a global function with example usage: stem(word) and returns: stemmed_word