code: def create_reciprocal_rank_lambda_weight(
      topn=None, smooth_fraction=0.0
  ):
      """Creates _LambdaWeight for MRR-like metric."""
      return losses_impl.DCGLambdaWeight(
          topn,
          gain_fn=lambda labels: labels,
          rank_discount_fn=lambda rank: 1.0 / rank,
          normalized=True,
          smooth_fraction=smooth_fraction,
      )
  
imports: from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence, Tuple, Union
  import tensorflow
  from tensorflow_ranking.python import losses_impl
  from tensorflow_ranking.python import utils
label_desc: Use image node_id 4 for calling a global function with example usage: create_reciprocal_rank_lambda_weight(topn, smooth_fraction) and returns: losses_impl