code: def test_errors(self, aug_toks):
      for num in [-1, 2.0]:
          with pytest.raises(ValueError):
              _ = transforms.substitute_word_synonyms(aug_toks, num=num)
      for obj in [["foo", "bar"], "foo bar"]:
          with pytest.raises(TypeError):
              _ = transforms.substitute_word_synonyms(obj, num=1)
  
imports: from textacy.augmentation import transforms
  from textacy.augmentation import utils
  from textacy.types import AugTok
  import pytest
label_desc: Use image node_id 5 for calling the TestSubstituteWordSynonyms obj's underlying member method code with example usage: obj.test_errors(aug_toks) without return types