class_docstr: NDCG accumulator.
class_docstr_tok: ["NDCG","accumulator","."]
code: def __init__(self, size: int):
      self.ndcg = [0.0] * size
      self.total_weighted_examples = 0.0
  
imports: from typing import Dict, Iterable, List, Optional, Tuple, Union
  import apache_beam
  import numpy
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import util
label_desc: Use image node_id 1 to create a new _NDCGAccumulator object  with example: obj = _NDCGAccumulator(size)