code: def test_create_ndcg_lambda_weight(self):
      labels = [[2.0, 1.0]]
      ranks = [[1, 2]]
      lambda_weight = ranking_losses.create_ndcg_lambda_weight()
      scale = 2.0
      max_dcg = 3.0 / math.log(2.0) + 1.0 / math.log(3.0)
      self.assertAllClose(
          lambda_weight.pair_weights(labels, ranks).numpy() / scale,
          [
              [
                  [
                      0.0,
                      2.0
                      * (1.0 / math.log(2.0) - 1.0 / math.log(3.0))
                      / max_dcg,
                  ],
                  [
                      2.0
                      * (1.0 / math.log(2.0) - 1.0 / math.log(3.0))
                      / max_dcg,
                      0.0,
                  ],
              ]
          ],
      )
  
imports: import math
  import tensorflow
  from tensorflow_ranking.python import losses
  from tensorflow_ranking.python import losses_impl
label_desc: Use image node_id 22 for calling the LossesTest obj's underlying member method code with example usage: obj.test_create_ndcg_lambda_weight() without return types