code: def key_samples_by_col(samples, col):
      """Returns a dictionary of samples keyed by language."""
      samples_by_col = {}
      for sample in samples:
          col_val = sample[col]
          assert isinstance(col_val, str)
          if col_val not in samples_by_col:
              samples_by_col[col_val] = []
          samples_by_col[col_val].append(sample)
      return samples_by_col
  
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 for calling a global function with example usage: key_samples_by_col(samples, col) and returns: samples_by_col