code: def __init__(
      self, config, samples, tokenizer, sample_rate, is_eval=False
  ):
      self.config = config
      model_args = config.model_args
      self.failed_samples = set()
      self.debug_failures = model_args.debug_loading_failures
      self.max_conditioning_length = model_args.max_conditioning_length
      self.min_conditioning_length = model_args.min_conditioning_length
      self.is_eval = is_eval
      self.tokenizer = tokenizer
      self.sample_rate = sample_rate
      self.max_wav_len = model_args.max_wav_length
      self.max_text_len = model_args.max_text_length
      self.use_masking_gt_prompt_approach = (
          model_args.gpt_use_masking_gt_prompt_approach
      )
      assert (
          self.max_wav_len is not None and self.max_text_len is not None
      )
  
      self.samples = samples
      if not is_eval:
          random.seed(config.training_seed)
          # random.shuffle(self.samples)
          random.shuffle(self.samples)
          # order by language
          self.samples = key_samples_by_col(self.samples, "language")
          print(" > Sampling by language:", self.samples.keys())
      else:
          # for evaluation load and check samples that are corrupted to ensures the reproducibility
          self.check_eval_samples()
  
file_path: TTS/TTS/tts/layers/xtts/trainer/dataset.py
imports: import os
  import random
  import sys
  import torch
  import torch.nn.functional
  import torch.utils.data
  from TTS.tts.models.xtts import load_audio
label_desc: Use image node_id 1 to create a new XTTSDataset object from inherited base classes: torch.utils.data with example: obj = XTTSDataset(config, samples, tokenizer, sample_rate, is_eval)