code: def test_bad_filters():
      bad_filters = (
          {"lang": "xx"},
          {"lang": ["en", "un"]},
      )
      for bad_filter in bad_filters:
          with pytest.raises(ValueError):
              list(DATASET.texts(**bad_filter))
      bad_filters = (
          {"lang": True},
          {"lang": textacy.load_spacy_lang("en_core_web_sm")},
      )
      for bad_filter in bad_filters:
          with pytest.raises(TypeError):
              list(DATASET.texts(**bad_filter))
  
file_path: textacy/tests/datasets/test_udhr.py
imports: import os
  import pytest
  import textacy
  from textacy.datasets.udhr import UDHR
label_desc: Use image node_id 8 for calling a global function with example usage: test_bad_filters() without return types