def METHOD_NAME(self, idx: int):
    """convert the dataset sample to training record the CSV Dataset
    Args:
        idx (int) : the request index in all the dataset
    """
    sample = self.data[idx]
    record = {}
    # To show all fields in a namedtuple: `type(sample)._fields`
    for field in fields(sample):
        record[field.name] = getattr(sample, field.name)
    waveform, sr = load_audio(record['wav'])
    # random select a chunk audio samples from the audio
    if self.config and self.config.random_chunk:
        num_wav_samples = waveform.shape[0]
        num_chunk_samples = int(self.config.chunk_duration * sr)
        start = random.randint(0, num_wav_samples - num_chunk_samples - 1)
        stop = start + num_chunk_samples
    else:
        start = record['start']
        stop = record['stop']
    # we only return the waveform as feat
    waveform = waveform[start:stop]
    # all availabel feature type is in feat_funcs
    assert self.feat_type in feat_funcs.keys(), \
        f"Unknown feat_type: {self.feat_type}, it must be one in {list(feat_funcs.keys())}"
    feat_func = feat_funcs[self.feat_type]
    feat = feat_func(
        waveform, sr=sr, **self.feat_config) if feat_func else waveform
    record.update({'feat': feat})
    if self.label2id:
        record.update({'label': self.label2id[record['label']]})
    return record