code: def test_dcg_at_k():
      label = [0, 1, 2]
      score = [0.1, 0.4, 0.2]
      dcg = metrics.DiscountedCumulativeGain
      assert round(dcg(k=1)(label, score), 2) == 1.44
      assert round(dcg(k=2)(label, score), 2) == 4.17
      assert round(dcg(k=3)(label, score), 2) == 4.17
  
file_path: MatchZoo/tests/unit_test/test_metrics.py
imports: import numpy
  from matchzoo.engine.base_metric import sort_and_couple
  from matchzoo import metrics
label_desc: Use image node_id 6 for calling a global function with example usage: test_dcg_at_k() without return types