code: def normalize_speaker(speaker):
      """
      Normalize and correct the speaker name.
  
      Arguments
      ---------
      speaker: str
          Initial name of the speaker as given by the xml file.
  
      Returns
      -------
      str
      """
  
      speaker = speaker.replace("-", "_")
      speaker = speaker.replace("#", "_")
      speaker = speaker.replace("__", "_1_")
      speaker = speaker.replace("speaker1", "speaker")
      speaker = speaker.replace("108730", "1_08730")
      speaker = speaker.replace("087301123", "08730_1123")
      speaker = speaker.replace("087301457", "08730_1457")
      speaker = speaker.replace(".", "")
      speaker = speaker.replace(
          "speaker_08730_1394", "speaker_1_08730_1394"
      )
      speaker = speaker.replace(
          "speaker_08730_1399", "speaker_1_08730_1399"
      )
      speaker = speaker.replace(
          "speaker_08730_37", "speaker_1_08730_37"
      )
      speaker = speaker.replace(
          "speaker_08730_400", "speaker_1_08730_400"
      )
      speaker = speaker.replace("_8730", "_08730")
      speaker = speaker.replace("_0873", "_08730")
      speaker = speaker.replace("_08737", "_08730")
      speaker = speaker.replace("21_08730", "1_08730")
      speaker = speaker.replace("058730", "08730")
      speaker = speaker.replace("2_08730", "1_08730")
      speaker = speaker.replace(
          "speaker_08730_846", "speaker_1_08730_846"
      )
      speaker = speaker.replace(
          "speaker_8730_270", "speaker_1_08730_270"
      )
      return speaker
  
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 18 for calling a global function with example usage: normalize_speaker(speaker) and returns: speaker