code: def test_weighted_category_accuracy_even_weights(self):
      layer = tl.WeightedCategoryAccuracy()
      weights = np.array([1.0, 1.0, 1.0])
      targets = np.array([0, 1, 2])
  
      model_outputs = np.array(
          [
              [0.7, 0.2, 0.1, 0.0],
              [0.2, 0.7, 0.1, 0.0],
              [0.2, 0.1, 0.7, 0.0],
          ]
      )
      accuracy = layer([model_outputs, targets, weights])
      self.assertEqual(accuracy, 1.0)
  
      model_outputs = np.array(
          [
              [0.2, 0.1, 0.7, 0.0],
              [0.2, 0.1, 0.7, 0.0],
              [0.2, 0.1, 0.7, 0.0],
          ]
      )
      accuracy = layer([model_outputs, targets, weights])
      self.assertEqual(accuracy, 1 / 3)
  
imports: from absl.testing import absltest
  import numpy
  import trax.layers
label_desc: Use image node_id 2 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_weighted_category_accuracy_even_weights() without return types