class_docstr: Audio samples IO handling within a given dora xp.
  
  The sample manager handles the dumping and loading logic for generated and
  references samples across epochs for a given xp, providing a simple API to
  store, retrieve and compare audio samples.
  
  Args:
      xp (dora.XP): Dora experiment object. The XP contains information on the XP folder
          where all outputs are stored and the configuration of the experiment,
          which is useful to retrieve audio-related parameters.
      map_reference_to_sample_id (bool): Whether to use the sample_id for all reference samples
          instead of generating a dedicated hash id. This is useful to allow easier comparison
          with ground truth sample from the files directly without having to read the JSON metadata
          to do the mapping (at the cost of potentially dumping duplicate prompts/references
          depending on the task).
docstr: Stores the audio with the given stem path using the XP's configuration.
  
  Args:
      wav (torch.Tensor): Audio to store.
      stem_path (Path): Path in sample output directory with file stem to use.
      overwrite (bool): When False (default), skips storing an existing audio file.
  Returns:
      Path: The path at which the audio is stored.
docstr_tok: ["Stores","the","audio","with","the","given","stem","path","using","the","XP","'s","configuration",".","Args",":","wav","(","torch.Tensor",")",":","Audio","to","store",".","stem_path","(","Path",")",":","Path","in","sample","output","directory","with","file","stem","to","use",".","overwrite","(","bool",")",":","When","False","(","default",")",",","skips","storing","an","existing","audio","file",".","Returns",":","Path",":","The","path","at","which","the","audio","is","stored","."]
code: def _store_audio(
      self, wav: torch.Tensor, stem_path: Path, overwrite: bool = False
  ) -> Path:
      """Stores the audio with the given stem path using the XP's configuration.
  
      Args:
          wav (torch.Tensor): Audio to store.
          stem_path (Path): Path in sample output directory with file stem to use.
          overwrite (bool): When False (default), skips storing an existing audio file.
      Returns:
          Path: The path at which the audio is stored.
      """
      existing_paths = [
          path
          for path in stem_path.parent.glob(stem_path.stem + ".*")
          if path.suffix != ".json"
      ]
      exists = len(existing_paths) > 0
      if exists and overwrite:
          logger.warning(
              f"Overwriting existing audio file with stem path {stem_path}"
          )
      elif exists:
          return existing_paths[0]
  
      audio_path = audio_write(
          stem_path, wav, **self.xp.cfg.generate.audio
      )
      return audio_path
  
imports: from concurrent.futures import ThreadPoolExecutor
  from dataclasses import asdict, dataclass
  from functools import lru_cache
  import hashlib
  import json
  import logging
  from pathlib import Path
  import re
  import typing
  import unicodedata
  import uuid
  import dora
  import torch
  from ...data.audio import audio_read, audio_write
label_desc: Use image node_id 8 for calling the SampleManager obj's underlying member method code with example usage: obj._store_audio(wav, stem_path, overwrite) and returns: audio_path, existing_paths