code: def _label_boost(boost_form, label):
      """Returns the label boost.
  
      Args:
        boost_form: Either NDCG or PRECISION.
        label: The example label.
  
      Returns:
        A list of per list weight.
      """
      boost = {
          "NDCG": math.pow(2.0, label) - 1.0,
          "PRECISION": 1.0 if label >= 1.0 else 0.0,
          "MAP": 1.0 if label >= 1.0 else 0.0,
          "ALPHADCG": 1.0 if label >= 1.0 else 0.0,
      }
      return boost[boost_form]
  
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 4 for calling a global function with example usage: _label_boost(boost_form, label) and returns: boost