code: def encode_dialogue_dataset(
      save_file: str,
      data_path: str,
      data_split: List[str],
      replacements_path: str,
  ) -> None:
      """
      Wrapper function that loads processed data stored at
      dst_folder/file_name. If they are not available, it processes the
      original data and then saves them at dst_folder/file_name.
  
      Arguments
      ---------
      save_file: str
          Path of the file where the dataset will be saved.
      data_path: str
          Path to the folder where the original MultiWOZ dataset is stored.
      data_split: list of str
          List of strings containing MultiWOZ 2.1 keys of the dialogues
          associated with a certain split (train, dev, test).
      replacements_path: str
          Path to file containing (from, to) pairs, one per line.
      """
  
      replacements = get_replacements(replacements_path)
      logger.info(f"Extract dialogues from {data_path}")
      # custom loading function to return the important elements of a dialogue
      dialogues = load_dialogues(data_path, data_split, replacements)
  
      logger.info("Create dataset")
      dataset = create_dialogue_dataset(dialogues)
      logger.info(f"Save dataset in {save_file}")
      save_dialogue_dataset(dataset, save_file)
  
imports: from itertools import product
  from statistics import mean
  from typing import Any, Dict, List, Optional, Set, Tuple
  import json
  import logging
  import os
  import re
  import shutil
  from tqdm import tqdm
  from speechbrain.utils.data_utils import download_file
label_desc: Use image node_id 7 for calling a global function with example usage: encode_dialogue_dataset(save_file, data_path, data_split, replacements_path) without return types