code: def test_interpret_fails_when_embedding_layer_not_found(self):
      inputs = {"sentence": "It was the ending that I hated"}
      vocab = Vocabulary()
      vocab.add_tokens_to_namespace(
          [w for w in inputs["sentence"].split(" ")]
      )
      model = FakeModelForTestingInterpret(
          vocab, max_tokens=len(inputs["sentence"].split(" "))
      )
      predictor = TextClassifierPredictor(
          model, TextClassificationJsonReader()
      )
  
      interpreter = SimpleGradient(predictor)
      with raises(RuntimeError):
          interpreter.saliency_interpret_from_json(inputs)
  
file_path: allennlp/tests/interpret/simple_gradient_test.py
imports: from pytest import approx, raises
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.interpret.saliency_interpreters import SimpleGradient
  from allennlp.models.archival import load_archive
  from allennlp.predictors import Predictor, TextClassifierPredictor
  from allennlp.data.dataset_readers import TextClassificationJsonReader
  from allennlp.data.vocabulary import Vocabulary
  from allennlp.common.testing.interpret_test import FakeModelForTestingInterpret, FakePredictorForTestingInterpret
label_desc: Use image node_id 2 for calling the TestSimpleGradient obj's underlying member method code with example usage: obj.test_interpret_fails_when_embedding_layer_not_found() without return types