code: def test_lookups_to_from_disk():
      lookups = Lookups()
      lookups.add_table("table1", {"foo": "bar", "hello": "world"})
      lookups.add_table("table2", {"a": 1, "b": 2, "c": 3})
      with make_tempdir() as tmpdir:
          lookups.to_disk(tmpdir)
          new_lookups = Lookups()
          new_lookups.from_disk(tmpdir)
      assert len(new_lookups) == 2
      assert "table1" in new_lookups
      assert "table2" in new_lookups
      table1 = new_lookups.get_table("table1")
      assert len(table1) == 2
      assert table1["foo"] == "bar"
      table2 = new_lookups.get_table("table2")
      assert len(table2) == 3
      assert table2["b"] == 2
  
file_path: spacy/spacy/tests/vocab_vectors/test_lookups.py
imports: import pytest
  from spacy.lookups import Lookups, Table
  from spacy.strings import get_string_id
  from spacy.vocab import Vocab
  from ..util import make_tempdir
label_desc: Use image node_id 5 for calling a global function with example usage: test_lookups_to_from_disk() without return types