class_docstr: Test caching.
docstr: Test dataset serialization.
docstr_tok: ["Test","dataset","serialization","."]
code: def test_serialization(self):
      """Test dataset serialization."""
      dataset = Nations()
      with tempfile.TemporaryDirectory() as directory:
          path = pathlib.Path(directory)
          dataset.to_directory_binary(path=path)
          dataset2 = Dataset.from_directory_binary(path=path)
          assert dataset == dataset2
  
file_path: pykeen/tests/test_datasets/test_cache.py
imports: import pathlib
  import shutil
  import tempfile
  import unittest
  from timeit import default_timer
  from pykeen.constants import PYKEEN_DATASETS
  from pykeen.datasets import Nations
  from pykeen.datasets.base import Dataset
  from pykeen.datasets.utils import _cached_get_dataset, _digest_kwargs
label_desc: Use image node_id 2 for calling the TestDatasetCaching obj's underlying member method code with example usage: obj.test_serialization() without return types