code: def __init__(
      self,
      capacity: int,
      window: int,
      callback: Callable[[float], None],
  ):
      self._capacity = capacity
      self._window = window
      self._callback = callback
      self._min_heap = PriorityQueue()
      self._cur_num = 0
  
      if capacity <= 0 or window <= 0:
          raise ValueError(
              f"capacity or window expect to get a positive integer,"
              f"but capacity got: {capacity} and window got: {window}"
          )
  
imports: import logging
  import time
  import weakref
  from contextlib import contextmanager
  from enum import Enum
  from queue import PriorityQueue
  from typing import Any, Callable, Dict, List, NamedTuple, Optional, Tuple
  from .backends.console import console_metric
  from .backends.metric import AbstractMetric
  from .backends.prometheus import prometheus_metric
  from .backends.ray import ray_metric
label_desc: Use image node_id 1 to create a new Percentile object  with example: obj = Percentile(capacity, window, callback)