class_docstr: Buffer that stores (completed or truncated) episodes by their ID.
  
  Each "row" (a slot in a deque) in the buffer is occupied by one episode. If an
  incomplete episode is added to the buffer and then another chunk of that episode is
  added at a later time, the buffer will automatically concatenate the new fragment to
  the original episode. This way, episodes can be completed via subsequent `add`
  calls.
  
  Sampling returns batches of size B (number of "rows"), where each row is a
  trajectory of length T. Each trajectory contains consecutive timesteps from an
  episode, but might not start at the beginning of that episode. Should an episode end
  within such a trajectory, a random next episode (starting from its t0) will be
  concatenated to that "row". Example: `sample(B=2, T=4)` ->
  
     0 .. 1 .. 2 .. 3  <- T-axis
  0 e5   e6   e7   e8
  1 f2   f3   h0   h2
  ^ B-axis
  
  .. where e, f, and h are different (randomly picked) episodes, the 0-index (e.g. h0)
  indicates the start of an episode, and `f3` is an episode end (gym environment
  returned terminated=True or truncated=True).
  
  0-indexed returned timesteps contain the reset observation, a dummy 0.0 reward, as
  well as the first action taken in the episode (action picked after observing
  obs(0)).
  The last index in an episode (e.g. f3 in the example above) contains the final
  observation of the episode, the final reward received, a dummy action
  (repeat the previous action), as well as either terminated=True or truncated=True.
class_docstr_tok: ["Buffer","that","stores","(","completed","or","truncated",")","episodes","by","their","ID",".","Each","``","row","''","(","a","slot","in","a","deque",")","in","the","buffer","is","occupied","by","one","episode",".","If","an","incomplete","episode","is","added","to","the","buffer","and","then","another","chunk","of","that","episode","is","added","at","a","later","time",",","the","buffer","will","automatically","concatenate","the","new","fragment","to","the","original","episode",".","This","way",",","episodes","can","be","completed","via","subsequent","`","add","`","calls",".","Sampling","returns","batches","of","size","B","(","number","of","``","rows","''",")",",","where","each","row","is","a","trajectory","of","length","T.","Each","trajectory","contains","consecutive","timesteps","from","an","episode",",","but","might","not","start","at","the","beginning","of","that","episode",".","Should","an","episode","end","within","such","a","trajectory",",","a","random","next","episode","(","starting","from","its","t0",")","will","be","concatenated","to","that","``","row","''",".","Example",":","`","sample","(","B=2",",","T=4",")","`","-",">","0","..","1","..","2","..","3","<","-","T-axis","0","e5","e6","e7","e8","1","f2","f3","h0","h2","^","B-axis","..","where","e",",","f",",","and","h","are","different","(","randomly","picked",")","episodes",",","the","0-index","(","e.g",".","h0",")","indicates","the","start","of","an","episode",",","and","`","f3","`","is","an","episode","end","(","gym","environment","returned","terminated=True","or","truncated=True",")",".","0-indexed","returned","timesteps","contain","the","reset","observation",",","a","dummy","0.0","reward",",","as","well","as","the","first","action","taken","in","the","episode","(","action","picked","after","observing","obs","(","0",")",")",".","The","last","index","in","an","episode","(","e.g",".","f3","in","the","example","above",")","contains","the","final","observation","of","the","episode",",","the","final","reward","received",",","a","dummy","action","(","repeat","the","previous","action",")",",","as","well","as","either","terminated=True","or","truncated=True","."]
docstr: Returns number of timesteps that have been added in buffer's lifetime.
docstr_tok: ["Returns","number","of","timesteps","that","have","been","added","in","buffer","'s","lifetime","."]
code: def get_added_timesteps(self) -> int:
      """Returns number of timesteps that have been added in buffer's lifetime."""
      return self._num_timesteps_added
  
imports: from collections import deque
  import copy
  from typing import Any, Dict, List, Optional, Union
  import numpy
  from ray.rllib.env.single_agent_episode import SingleAgentEpisode
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.replay_buffers.base import ReplayBufferInterface
  from ray.rllib.utils.typing import SampleBatchType
label_desc: Use image node_id 8 for calling the EpisodeReplayBuffer obj's underlying member method code with example usage: obj.get_added_timesteps() and returns: self