docstr: Return list of last observations
  
  # Argument
      current_observation (object): Last observation
  
  # Returns
      A list of the last observations
docstr_tok: ["Return","list","of","last","observations","#","Argument","current_observation","(","object",")",":","Last","observation","#","Returns","A","list","of","the","last","observations"]
code: def get_recent_state(self, current_observation):
      """Return list of last observations
  
      # Argument
          current_observation (object): Last observation
  
      # Returns
          A list of the last observations
      """
      # This code is slightly complicated by the fact that subsequent observations might be
      # from different episodes. We ensure that an experience never spans multiple episodes.
      # This is probably not that important in practice but it seems cleaner.
      state = [current_observation]
      idx = len(self.recent_observations) - 1
      for offset in range(0, self.window_length - 1):
          current_idx = idx - offset
          current_terminal = (
              self.recent_terminals[current_idx - 1]
              if current_idx - 1 >= 0
              else False
          )
          if current_idx < 0 or (
              not self.ignore_episode_boundaries and current_terminal
          ):
              # The previously handled observation was terminal, don't add the current one.
              # Otherwise we would leak into a different episode.
              break
          state.insert(0, self.recent_observations[current_idx])
      while len(state) < self.window_length:
          state.insert(0, zeroed_observation(state[0]))
      return state
  
imports: from __future__ import absolute_import
  from collections import deque, namedtuple
  import warnings
  import random
  import numpy
label_desc: Use image node_id 4 for calling the Memory obj's underlying member method code with example usage: obj.get_recent_state(current_observation) and returns: state