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: Restores all local state to the provided `state`.
  
  Args:
      state: The new state to set this buffer. Can be
              obtained by calling `self.get_state()`.
docstr_tok: ["Restores","all","local","state","to","the","provided","`","state","`",".","Args",":","state",":","The","new","state","to","set","this","buffer",".","Can","be","obtained","by","calling","`","self.get_state","(",")","`","."]
code: def set_state(self, state: Dict[str, Any]) -> None:
      """Restores all local state to the provided `state`.
  
      Args:
          state: The new state to set this buffer. Can be
                  obtained by calling `self.get_state()`.
      """
      self._num_evicted = state["num_evicted"]
      self._num_add_calls = state["num_add_calls"]
      ReplayBuffer.set_state(self, state)
  
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 5 for calling the ReservoirReplayBuffer obj's underlying member method code with example usage: obj.set_state(state) without return types