code: def test_l2_loss(self):
      layer = tl.L2Loss()
  
      model_outputs = np.array([[1.0, 1.0], [1.0, 1.0]])
      targets = np.array([[1.0, 1.0], [1.0, 0.0]])
      weights = np.array([[1.0, 1.0], [1.0, 0.0]])
      loss = layer([model_outputs, targets, weights])
      np.testing.assert_allclose(loss, 0.0)
  
      weights = np.array([[1.0, 0.0], [0.0, 1.0]])
      loss = layer([model_outputs, targets, weights])
      np.testing.assert_allclose(loss, 0.5)
  
imports: from absl.testing import absltest
  import numpy
  import trax.layers
label_desc: Use image node_id 17 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_l2_loss() without return types