docstr: Tests stats by adding and sampling few samples and checking the
  values of the buffer's stats.
code: def test_stats(self):
      """Tests stats by adding and sampling few samples and checking the
      values of the buffer's stats.
      """
      self.batch_id = 0
  
      batch_size = 5
      buffer_size = 15
  
      buffer = ReplayBuffer(
          capacity=buffer_size, storage_unit="fragments"
      )
  
      # Test add/sample
      self._add_data_to_buffer(
          buffer, batch_size=batch_size, num_batches=1
      )
  
      # After adding a single batch to a buffer, it should not be full
      assert len(buffer) == 1
      assert buffer._num_timesteps_added == 5
      assert buffer._num_timesteps_added_wrap == 5
      assert buffer._next_idx == 1
      assert buffer._eviction_started is False
  
      # Sampling from it now should yield the first batch
      assert buffer.sample(1)["batch_id"][0] == 0
      # Sampling three times should yield 3 batches of 5 timesteps each
      buffer.sample(2)
      assert buffer._num_timesteps_sampled == 15
  
      self._add_data_to_buffer(
          buffer, batch_size=batch_size, num_batches=2
      )
  
      # After adding two more batches, the buffer should be full
      assert len(buffer) == 3
      assert buffer._num_timesteps_added == 15
      assert buffer._num_timesteps_added_wrap == 0
      assert buffer._next_idx == 0
      assert buffer._eviction_started is True
  
file_path: ray/python/ray/rllib/utils/replay_buffers/tests/test_replay_buffer.py
imports: import unittest
  import numpy
  from ray.rllib.policy.sample_batch import SampleBatch, MultiAgentBatch, concat_samples
  from ray.rllib.utils.replay_buffers.replay_buffer import ReplayBuffer
label_desc: Use image node_id 2 for calling the TestReplayBuffer obj's underlying member method code with example usage: obj.test_stats() without return types