code: def test_invalid_shape():
      with pytest.raises(ValueError) as exception_info:
          test_utils.layer_test(
              NetVLAD,
              kwargs={"num_clusters": 0},
              input_shape=(5, 4, 20),
          )
      assert "`num_clusters` must be greater than 1" in str(
          exception_info.value
      )
  
      with pytest.raises(ValueError) as exception_info:
          test_utils.layer_test(
              NetVLAD,
              kwargs={"num_clusters": 2},
              input_shape=(5, 4, 4, 20),
          )
      assert "must have rank 3" in str(exception_info.value)
  
imports: import pytest
  import numpy
  from tensorflow_addons.layers.netvlad import NetVLAD
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_invalid_shape() without return types