class_docstr: The parent class of custom metrics.
  
  Ray's custom metrics APIs are rooted from this class and share
  the same public methods.
class_docstr_tok: ["The","parent","class","of","custom","metrics",".","Ray","'s","custom","metrics","APIs","are","rooted","from","this","class","and","share","the","same","public","methods","."]
code: def __init__(
      self,
      name: str,
      description: str = "",
      tag_keys: Optional[Tuple[str, ...]] = None,
  ):
      if len(name) == 0:
          raise ValueError(
              "Empty name is not allowed. Please provide a metric name."
          )
      self._name = name
      self._description = description
      # The default tags key-value pair.
      self._default_tags = {}
      # Keys of tags.
      self._tag_keys = tag_keys or tuple()
      # The Cython metric class. This should be set in the child class.
      self._metric = None
  
      if not isinstance(self._tag_keys, tuple):
          raise TypeError(
              "tag_keys should be a tuple type, got: "
              f"{type(self._tag_keys)}"
          )
  
      for key in self._tag_keys:
          if not isinstance(key, str):
              raise TypeError(f"Tag keys must be str, got {type(key)}.")
  
imports: import logging
  from typing import Dict, Any, List, Optional, Tuple, Union
  from ray._raylet import Sum, Histogram, Gauge
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 1 to create a new Metric object  with example: obj = Metric(name, description, tag_keys)