class_docstr: Computes normalized discounted cumulative gain.
class_docstr_tok: ["Computes","normalized","discounted","cumulative","gain","."]
code: def _add_states(self, left: _State, right: _State) -> _State:
      ndcg_dict = self._new_ndcg_dict()
      for at in self._at_vals:
          ndcg_dict[at] = left.ndcg[at] + right.ndcg[at]
      return _State(ndcg_dict, left.weight + right.weight)
  
file_path: model-analysis/tensorflow_model_analysis/evaluators/query_metrics/ndcg.py
imports: from typing import Any, Dict, Iterable, List, NamedTuple, Tuple
  import apache_beam
  import numpy
  from tensorflow_model_analysis.evaluators.query_metrics import query_types
  from tensorflow_model_analysis.post_export_metrics import metric_keys
label_desc: Use image node_id 6 for calling the NdcgMetricCombineFn obj's underlying member method code with example usage: obj._add_states(left, right) and returns: _State