class_docstr: Test the InterclusterDistance visualizer
class_docstr_tok: ["Test","the","InterclusterDistance","visualizer"]
docstr: Should raise an exception on invalid embedding
docstr_tok: ["Should","raise","an","exception","on","invalid","embedding"]
code: def test_only_valid_embeddings(self):
      """
      Should raise an exception on invalid embedding
      """
      # On init
      with pytest.raises(
          YellowbrickValueError, match="unknown embedding 'foo'"
      ):
          InterclusterDistance(KMeans(), embedding="foo")
  
      # After init
      icdm = InterclusterDistance(KMeans())
      icdm.embedding = "foo"
      with pytest.raises(
          YellowbrickValueError, match="unknown embedding 'foo'"
      ):
          icdm.transformer
  
imports: import pytest
  import matplotlib
  import numpy
  from yellowbrick.cluster.icdm import *
  from yellowbrick.datasets import load_nfl
  from yellowbrick.exceptions import YellowbrickValueError
  from unittest import mock
  from tests.fixtures import Dataset
  from tests.base import IS_WINDOWS_OR_CONDA, VisualTestCase
  from sklearn.datasets import make_blobs
  from sklearn.cluster import Birch, AgglomerativeClustering
  from sklearn.decomposition import LatentDirichletAllocation
  from sklearn.cluster import KMeans, AffinityPropagation, MiniBatchKMeans
  from sklearn.pipeline import Pipeline
  from sklearn.impute import SimpleImputer
label_desc: Use image node_id 1 for calling the TestInterclusterDistance obj's underlying member method code with example usage: obj.test_only_valid_embeddings() without return types