code: def _alpha_dcg(
      label,
      cum_label,
      rank,
      weight=1.0,
      alpha=0.5,
      rank_discount_fn=lambda r: 1.0 / math.log(r + 1.0, 2.0),
  ):
      """Returns a single alpha dcg addend.
  
      Args:
        label: The document label.
        cum_label: The cumulative document label.
        rank: The document rank starting from 1.
        weight: The document weight.
        alpha: The information gain about a subtopic from a doc.
        rank_discount_fn: (function) The rank discount function.
  
      Returns:
        A single alpha dcg addend. e.g.
        weight*(relevance*SUM((1-alpha)^SUM(relevance)))/log2(rank+1).
      """
      gain = sum(
          l * (1 - alpha) ** cl for l, cl in zip(label, cum_label)
      )
      return weight * gain * rank_discount_fn(rank)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import math
  import tensorflow
  from tensorflow_ranking.python import metrics
label_desc: Use image node_id 2 for calling a global function with example usage: _alpha_dcg(label, cum_label, rank, weight, alpha, rank_discount_fn) and returns: unknown