code: def test_spatial_gru():
      s_value = K.variable(
          np.array(
              [
                  [[[1, 2], [2, 3], [3, 4]], [[4, 5], [5, 6], [6, 7]]],
                  [
                      [[0.1, 0.2], [0.2, 0.3], [0.3, 0.4]],
                      [[0.4, 0.5], [0.5, 0.6], [0.6, 0.7]],
                  ],
              ]
          )
      )
      for direction in ["lt", "rb"]:
          model = SpatialGRU(direction=direction)
          _ = K.eval(model(s_value))
      with pytest.raises(ValueError):
          SpatialGRU(direction="lr")(s_value)
  
file_path: MatchZoo/tests/unit_test/test_layers.py
imports: import numpy
  import pytest
  from keras import backend
  from matchzoo import layers
  from matchzoo.contrib.layers import SpatialGRU
  from matchzoo.contrib.layers import MatchingTensorLayer
label_desc: Use image node_id 2 for calling a global function with example usage: test_spatial_gru() without return types