code: def test_to_aug_toks(doc_en):
      aug_toks = utils.to_aug_toks(doc_en)
      assert isinstance(aug_toks, list)
      assert all(isinstance(aug_tok, AugTok) for aug_tok in aug_toks)
      assert len(aug_toks) == len(doc_en)
      for obj in ["foo bar bat baz", ["foo", "bar", "bat", "baz"]]:
          with pytest.raises(TypeError):
              _ = utils.to_aug_toks(obj)
  
imports: import pytest
  from textacy.augmentation import utils
  from textacy.types import AugTok
label_desc: Use image node_id 2 for calling a global function with example usage: test_to_aug_toks(doc_en) without return types