docstr: Assert exception is raised when number of labels doesn't match
docstr_tok: ["Assert","exception","is","raised","when","number","of","labels","does","n't","match"]
code: def test_dispersion_plot_mismatched_labels(self):
      """
      Assert exception is raised when number of labels doesn't match
      """
      target = corpus.target
      text = [doc.split() for doc in corpus.data]
      search_terms = ["girl", "she", "boy", "he", "man"]
  
      visualizer = DispersionPlot(
          search_terms, annotate_docs=True, labels=["a", "b"]
      )
  
      msg = (
          r"number of supplied labels \(\d\) "
          r"does not match the number of classes \(\d\)"
      )
  
      with pytest.raises(YellowbrickValueError, match=msg):
          visualizer.fit(text, target)
  
file_path: yellowbrick/tests/test_text/test_dispersion.py
imports: import pytest
  import matplotlib.pyplot
  from yellowbrick.exceptions import YellowbrickValueError
  from yellowbrick.datasets import load_hobbies
  from yellowbrick.text.dispersion import DispersionPlot, dispersion
  from tests.base import VisualTestCase
label_desc: Use image node_id 7 for calling the TestDispersionPlot obj's underlying member method code with example usage: obj.test_dispersion_plot_mismatched_labels() without return types