code: def test_masking(self):
      sequence = np.arange(24).reshape((2, 4, 3)).astype("float32")
      forward_layer = layers.GRU(
          2,
          kernel_initializer=initializers.Constant(0.01),
          recurrent_initializer=initializers.Constant(0.02),
          bias_initializer=initializers.Constant(0.03),
      )
      layer = layers.Bidirectional(layer=forward_layer)
      mask = np.array(
          [[True, True, False, True], [True, False, False, True]]
      )
      output = layer(sequence, mask=mask)
      self.assertAllClose(
          np.array(
              [
                  [0.19393763, 0.19393763, 0.11669192, 0.11669192],
                  [0.30818558, 0.30818558, 0.28380975, 0.28380975],
              ]
          ),
          output,
      )
  
file_path: keras/keras/layers/rnn/bidirectional_test.py
imports: import numpy
  import pytest
  from keras import initializers
  from keras import layers
  from keras import testing
label_desc: Use image node_id 5 for calling the SimpleRNNTest obj's underlying member method code with example usage: obj.test_masking() without return types