code: def test_get_activation_layer_invalid(simple_seq):
      # invalid layer shape
      with pytest.raises(ValueError):
          # GAP has rank 2 shape, need rank 4
          _get_activation_layer(simple_seq, "layer3")
      # invalid layer type
      with pytest.raises(TypeError):
          _get_activation_layer(simple_seq, 2.5)
      # can not find activation layer automatically
      # this is handled by _search_layer_backwards function
      with pytest.raises(ValueError):
          _get_activation_layer(
              Sequential(),  # a model with no layers
              None,
          )
  
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 3 for calling a global function with example usage: test_get_activation_layer_invalid(simple_seq) without return types