code: def test_word_counts_error(self, corpus):
      with pytest.raises(ValueError):
          corpus.word_counts(weighting="foo")
  
imports: import collections
  import itertools
  import numpy
  import pytest
  from spacy.tokens import Doc
  from textacy import Corpus
  from textacy import load_spacy_lang
label_desc: Use image node_id 8 for calling the TestCorpusMethods obj's underlying member method code with example usage: obj.test_word_counts_error(corpus) without return types