class_docstr: This buffer implements reservoir sampling.
  
  The algorithm has been described by Jeffrey S. Vitter in "Random sampling
  with a reservoir".
class_docstr_tok: ["This","buffer","implements","reservoir","sampling",".","The","algorithm","has","been","described","by","Jeffrey","S.","Vitter","in","``","Random","sampling","with","a","reservoir","''","."]
docstr: Returns the stats of this buffer.
  
  Args:
      debug: If True, adds sample eviction statistics to the returned
              stats dict.
  
  Returns:
      A dictionary of stats about this buffer.
docstr_tok: ["Returns","the","stats","of","this","buffer",".","Args",":","debug",":","If","True",",","adds","sample","eviction","statistics","to","the","returned","stats","dict",".","Returns",":","A","dictionary","of","stats","about","this","buffer","."]
code: def stats(self, debug: bool = False) -> dict:
      """Returns the stats of this buffer.
  
      Args:
          debug: If True, adds sample eviction statistics to the returned
                  stats dict.
  
      Returns:
          A dictionary of stats about this buffer.
      """
      data = {
          "num_evicted": self._num_evicted,
          "num_add_calls": self._num_add_calls,
      }
      parent = ReplayBuffer.stats(self, debug)
      parent.update(data)
      return parent
  
file_path: ray/rllib/utils/replay_buffers/reservoir_replay_buffer.py
imports: from typing import Any, Dict
  import random
  import ray
  import psutil
  from ray.rllib.utils.annotations import ExperimentalAPI, override
  from ray.rllib.utils.replay_buffers.replay_buffer import ReplayBuffer, warn_replay_capacity
  from ray.rllib.utils.typing import SampleBatchType
label_desc: Use image node_id 3 for calling the ReservoirReplayBuffer obj's underlying member method code with example usage: obj.stats(debug) and returns: parent