code: def test_wordpieces_IO(wordpieces):
      wp_dict = wordpieces.to_dict()
      wordpieces_2 = WordpieceBatch.empty().from_dict(wp_dict)
      for key, value in wordpieces_2.to_dict().items():
          assert_equal(value, wp_dict[key])
  
imports: import pytest
  import numpy
  from numpy.testing import assert_equal
  from spacy_transformers.data_classes import WordpieceBatch
label_desc: Use image node_id 2 for calling a global function with example usage: test_wordpieces_IO(wordpieces) without return types