code: def prepare_audio_filepath(audio_filepath):
      """
      Helper method to run in batch mode over a mapped Dataset.
  
      Prepares the audio filepath and its subdirectories. Remaps the extension to .wav file.
  
      Args:
          audio_filepath: String path to the audio file.
  
      Returns:
          Cleaned filepath renamed to be a wav file.
      """
      audio_basefilepath = os.path.split(audio_filepath)[0]
      if not os.path.exists(audio_basefilepath):
          os.makedirs(audio_basefilepath, exist_ok=True)
  
      # Remove temporary fmt file
      if os.path.exists(audio_filepath):
          os.remove(audio_filepath)
  
      # replace any ext with .wav
      audio_filepath, ext = os.path.splitext(audio_filepath)
      audio_filepath = audio_filepath + ".wav"
  
      # Remove previous run file
      if os.path.exists(audio_filepath):
          os.remove(audio_filepath)
      return audio_filepath
  
imports: import json
  import os
  import traceback
  from dataclasses import dataclass, is_dataclass
  from typing import Optional
  import hydra
  import librosa
  import soundfile
  import tqdm
  from datasets import Audio, Dataset, IterableDataset, load_dataset
  from hydra.conf import HydraConf, RunDir
  from hydra.core.config_store import ConfigStore
  from omegaconf import OmegaConf
label_desc: Use image node_id 3 for calling a global function with example usage: prepare_audio_filepath(audio_filepath) and returns: audio_filepath