code: def test_dataset_kwargs(self, tok_name):
      tokenizer = AutoTokenizer.from_pretrained(
          tok_name, use_fast=False
      )
      if tok_name == MBART_TINY:
          train_dataset = Seq2SeqDataset(
              tokenizer,
              data_dir=make_test_data_dir(
                  tmp_dir=self.get_auto_remove_tmp_dir()
              ),
              type_path="train",
              max_source_length=4,
              max_target_length=8,
              src_lang="EN",
              tgt_lang="FR",
          )
          kwargs = train_dataset.dataset_kwargs
          assert "src_lang" in kwargs and "tgt_lang" in kwargs
      else:
          train_dataset = Seq2SeqDataset(
              tokenizer,
              data_dir=make_test_data_dir(
                  tmp_dir=self.get_auto_remove_tmp_dir()
              ),
              type_path="train",
              max_source_length=4,
              max_target_length=8,
          )
          kwargs = train_dataset.dataset_kwargs
          assert (
              "add_prefix_space" not in kwargs
              if tok_name != BART_TINY
              else "add_prefix_space" in kwargs
          )
          assert (
              len(kwargs) == 1
              if tok_name == BART_TINY
              else len(kwargs) == 0
          )
  
imports: import os
  from pathlib import Path
  import numpy
  import pytest
  from torch.utils.data import DataLoader
  from pack_dataset import pack_data_dir
  from parameterized import parameterized
  from save_len_file import save_len_file
  from transformers import AutoTokenizer
  from transformers.models.mbart.modeling_mbart import shift_tokens_right
  from transformers.testing_utils import TestCasePlus, slow
  from utils import FAIRSEQ_AVAILABLE, DistributedSortishSampler, LegacySeq2SeqDataset, Seq2SeqDataset
label_desc: Use image node_id 8 for calling the TestAll obj's underlying member method code with example usage: obj.test_dataset_kwargs(tok_name) without return types