def METHOD_NAME(features, text_path, tmp_path):
    cache_dir = tmp_path / "cache"
    default_expected_features = {"text": "string"}
    expected_features = features.copy() if features else default_expected_features
    features = (
        Features({feature: Value(dtype) for feature, dtype in features.items()}) if features is not None else None
    )
    dataset = TextDatasetReader(text_path, features=features, cache_dir=cache_dir).read()
    _check_text_dataset(dataset, expected_features)