code: def test_records_subset():
      subsets = ({"train"}, {"test", "train"})
      for subset in subsets:
          records = list(DATASET.records(subset=subset, limit=10))
          assert all(meta["subset"] in subset for text, meta in records)
  
file_path: textacy/tests/datasets/test_imdb.py
imports: import datetime
  import os
  import pytest
  from textacy.datasets.imdb import IMDB
label_desc: Use image node_id 8 for calling a global function with example usage: test_records_subset() without return types