class_docstr: Implements base ranking metric class.
  
  Please see tf.keras.metrics.Mean for more information about such a class and
  https://www.tensorflow.org/tutorials/distribute/custom_training on how to do
  customized training.
class_docstr_tok: ["Implements","base","ranking","metric","class",".","Please","see","tf.keras.metrics.Mean","for","more","information","about","such","a","class","and","https",":","\/\/www.tensorflow.org\/tutorials\/distribute\/custom_training","on","how","to","do","customized","training","."]
code: def __init__(self, name=None, dtype=None, ragged=False, **kwargs):
      super(_RankingMetric, self).__init__(
          name=name, dtype=dtype, **kwargs
      )
      # An instance of `metrics_impl._RankingMetric`.
      # Overwrite this in subclasses.
      self._metric = None
      self._ragged = ragged
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Any, Dict, List, Optional
  import tensorflow.compat.v2
  from tensorflow_ranking.python import metrics_impl
  from tensorflow_ranking.python.keras import utils
label_desc: Use image node_id 1 to create a new _RankingMetric object from inherited base classes: tf.keras.metrics with example: obj = _RankingMetric(name, dtype, ragged)