class_docstr: Task for joint training speech and text to text.
class_docstr_tok: ["Task","for","joint","training","speech","and","text","to","text","."]
docstr: Load a given dataset split.
  
  Args:
      split (str): name of the split (e.g., train, valid, test)
docstr_tok: ["Load","a","given","dataset","split",".","Args",":","split","(","str",")",":","name","of","the","split","(","e.g.",",","train",",","valid",",","test",")"]
code: def load_dataset(self, split, epoch=1, combine=False, **kwargs):
      """Load a given dataset split.
  
      Args:
          split (str): name of the split (e.g., train, valid, test)
      """
      is_train_split = split.startswith("train")
      pre_tokenizer = self.build_tokenizer(self.args)
      bpe_tokenizer = self.build_bpe(self.args)
      src_pre_tokenizer = self.build_src_tokenizer(self.args)
      src_bpe_tokenizer = self.build_src_bpe(self.args)
      ast_dataset = SpeechToTextJointDatasetCreator.from_tsv(
          self.args.data,
          self.data_cfg,
          split,
          self.tgt_dict,
          src_dict=None if self.speech_only else self.src_dict,
          pre_tokenizer=pre_tokenizer,
          bpe_tokenizer=bpe_tokenizer,
          src_pre_tokenizer=src_pre_tokenizer,
          src_bpe_tokenizer=src_bpe_tokenizer,
          is_train_split=is_train_split,
          epoch=epoch,
          seed=self.args.seed,
      )
      noise_token_id = -1
      text_dataset = None
      if self.args.parallel_text_data != "" and is_train_split:
          text_dataset = self.load_langpair_dataset(
              self.data_cfg.prepend_tgt_lang_tag_no_change,
              1.0,
              epoch=epoch,
          )
          if self.args.mask_text_ratio > 0:
              # add mask
              noise_token_id = (
                  self.src_dict.unk()
                  if self.args.noise_token == ""
                  else self.src_dict.index(self.args.noise_token)
              )
              text_dataset = LangPairMaskDataset(
                  text_dataset,
                  src_bos=self.src_dict.bos(),
                  src_eos=self.src_dict.eos(),
                  noise_id=noise_token_id,
                  mask_ratio=self.args.mask_text_ratio,
                  mask_type=self.args.mask_text_type,
              )
  
      if text_dataset is not None:
          mdsets = [
              ModalityDatasetItem(
                  "sup_speech",
                  ast_dataset,
                  (
                      self.args.max_source_positions,
                      self.args.max_target_positions,
                  ),
                  self.args.max_tokens,
                  self.args.batch_size,
              ),
              ModalityDatasetItem(
                  "text",
                  text_dataset,
                  (
                      self.args.max_positions_text,
                      self.args.max_target_positions,
                  ),
                  self.args.max_tokens_text
                  if self.args.max_tokens_text is not None
                  else self.args.max_tokens,
                  self.args.batch_size,
              ),
          ]
          ast_dataset = MultiModalityDataset(mdsets)
      self.datasets[split] = ast_dataset
  
imports: import logging
  import os
  from argparse import Namespace
  from pathlib import Path
  import torch
  from fairseq.data import encoders, Dictionary, ResamplingDataset, TransformEosLangPairDataset, ConcatDataset
  from fairseq.data.iterators import GroupedEpochBatchIterator
  from fairseq.data.audio.multi_modality_dataset import MultiModalityDataset, LangPairMaskDataset, ModalityDatasetItem
  from fairseq.data.audio.speech_to_text_dataset import SpeechToTextDataset, SpeechToTextDatasetCreator
  from fairseq.data.audio.speech_to_text_joint_dataset import S2TJointDataConfig, SpeechToTextJointDatasetCreator
  from fairseq.tasks import register_task
  from fairseq.tasks.speech_to_text import SpeechToTextTask
  from fairseq.tasks.translation import load_langpair_dataset
label_desc: Use image node_id 8 for calling the SpeechTextJointToTextTask obj's underlying member method code with example usage: obj.load_dataset(split, epoch, combine) without return types