code: def test_predict_equals_eval(self):
      x = np.array([[[2.0, 3.0], [1.0, 2.0], [0.0, 1.0], [3.0, 4.0]]])
      self.assertEqual(x.shape, (1, 4, 2))
  
      layer_eval = tl.PositionalEncoding(
          max_len=8, d_feature=4, mode="eval"
      )
      layer_eval.init(shapes.signature(x))
  
      output_eval = layer_eval(x)
  
      layer_predict = tl.PositionalEncoding(
          max_len=8, d_feature=4, mode="predict"
      )
      layer_predict.init(shapes.signature(x))
      layer_predict.weights = layer_eval.weights
  
      output_predict = layer_predict(x)
      self.assertTrue(np.array_equal(output_eval, output_predict))
  
imports: import functools
  from absl.testing import absltest
  import numpy
  from trax import shapes
  import trax.layers
  from trax.layers import test_utils
label_desc: Use image node_id 3 for calling the PositionalEncodingTest obj's underlying member method code with example usage: obj.test_predict_equals_eval() without return types