code: def clean_last_char(sentences):
      """
      Clean the sentences by deleting their last characters.
  
      Arguments
      ---------
      sentences: dictionnary of str
          All sentences being extracted from the turn.
  
      Returns
      -------
      dictionnary of str
      """
  
      for n in range(len(sentences)):
          if sentences[n][0] != "":
              sentences[n][0] = sentences[n][0][:-1]  # Remove last ' '
              sentences[n][1] = sentences[n][1][
                  :-3
              ]  # Remove last ' _ '
          else:
              del sentences[n]  # Usefull for last appended segment
      return sentences
  
imports: import xml.dom.minidom
  from tqdm import tqdm
  import logging
  import subprocess
  import csv
  import os
  import glob
  import re
label_desc: Use image node_id 11 for calling a global function with example usage: clean_last_char(sentences) and returns: sentences