code: def test_forward(self):
      layer = tl.PureLayer(lambda x: 2 * x)
  
      # Use Layer.__call__.
      in_0 = np.array([1, 2])
      out_0 = layer(in_0, weights=jnp.zeros((2, 3)))
      self.assertEqual(out_0.tolist(), [2, 4])
      self.assertEmpty(layer.weights)
  
      # Use PureLayer.forward.
      in_1 = np.array([3, 4])
      out_1 = layer.forward(in_1)
      self.assertEqual(out_1.tolist(), [6, 8])
  
      # Use Layer.pure_fn
      in_2 = np.array([5, 6])
      out_2, _ = layer.pure_fn(
          in_2, tl.EMPTY_WEIGHTS, tl.EMPTY_WEIGHTS, None
      )
      self.assertEqual(out_2.tolist(), [10, 12])
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from trax import fastmath
  from trax import shapes
  from trax.fastmath import numpy
  import trax.layers
label_desc: Use image node_id 1 for calling the PureLayerTest obj's underlying member method code with example usage: obj.test_forward() without return types