code: def test_dataset_from_text_path_type(path_type, text_path, tmp_path):
      if issubclass(path_type, str):
          path = text_path
      elif issubclass(path_type, list):
          path = [text_path]
      cache_dir = tmp_path / "cache"
      expected_features = {"text": "string"}
      dataset = TextDatasetReader(path, cache_dir=cache_dir).read()
      _check_text_dataset(dataset, expected_features)
  
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 5 for calling a global function with example usage: test_dataset_from_text_path_type(path_type, text_path, tmp_path) without return types