code: def test_get_target_prediction_invalid(simple_seq):
      # only list of targets is currently supported
      with pytest.raises(TypeError):
          _get_target_prediction("somestring", simple_seq)
      # only one target prediction is currently supported
      with pytest.raises(ValueError):
          _get_target_prediction([1, 2], simple_seq)
  
      # these are dispatched to _validate_target
      # only an integer index target is currently supported
      with pytest.raises(TypeError):
          _get_target_prediction(["someotherstring"], simple_seq)
      # target index must correctly reference one of the nodes in the final layer
      with pytest.raises(ValueError):
          _get_target_prediction([20], simple_seq)
  
imports: import pytest
  import keras.backend
  from keras.models import Sequential, Model
  from keras.layers import Dense, Activation, Conv2D, GlobalAveragePooling2D, Input, Lambda
  from keras.backend import epsilon
  import numpy
  from eli5.keras.explain_prediction import explain_prediction, _validate_doc, _get_activation_layer
  from eli5.keras.gradcam import _get_target_prediction, _calc_gradient, gradcam
label_desc: Use image node_id 6 for calling a global function with example usage: test_get_target_prediction_invalid(simple_seq) without return types