code: def test_datasetdict_from_text_split(split, text_path, tmp_path):
      if split:
          path = {split: text_path}
      else:
          split = "train"
          path = {"train": text_path, "test": text_path}
      cache_dir = tmp_path / "cache"
      expected_features = {"text": "string"}
      dataset = TextDatasetReader(path, cache_dir=cache_dir).read()
      _check_text_datasetdict(
          dataset, expected_features, splits=list(path.keys())
      )
      assert all(dataset[split].split == split for split in path.keys())
  
file_path: datasets/tests/io/test_text.py
imports: import pytest
  from datasets import Dataset, DatasetDict, Features, NamedSplit, Value
  from datasets.io.text import TextDatasetReader
  from ..utils import assert_arrow_memory_doesnt_increase, assert_arrow_memory_increases
label_desc: Use image node_id 9 for calling a global function with example usage: test_datasetdict_from_text_split(split, text_path, tmp_path) without return types