class_docstr: To run: "python -m saliency.core.integrated_gradients_test" from the top-level directory.
docstr: Tests that IG errors when receiving incorrect model output.
docstr_tok: ["Tests","that","IG","errors","when","receiving","incorrect","model","output","."]
code: def testIntegratedGradientsGetMaskError(self):
      """Tests that IG errors when receiving incorrect model output."""
      x_steps = 2001
      call_model_function = self.create_bad_call_model_function()
      expected_error = SHAPE_ERROR_MESSAGE[
          INPUT_OUTPUT_GRADIENTS
      ].format("\\(500, 3\\)", "\\(3,\\)")
  
      with self.assertRaisesRegex(ValueError, expected_error):
          self.ig_instance.GetMask(
              x_value=self.x_input_val,
              call_model_function=call_model_function,
              call_model_args=None,
              x_baseline=self.x_baseline_val,
              x_steps=x_steps,
              batch_size=500,
          )
  
file_path: saliency/saliency/core/integrated_gradients_test.py
imports: import unittest
  import unittest.mock
  from .base import INPUT_OUTPUT_GRADIENTS
  from .base import SHAPE_ERROR_MESSAGE
  from .None import integrated_gradients
  import numpy
label_desc: Use image node_id 8 for calling the IntegratedGradientsTest obj's underlying member method code with example usage: obj.testIntegratedGradientsGetMaskError() without return types