class_docstr: A trajectory of interactions with a RL environment.
  
  Trajectories are created when interacting with an RL environment. They can
  be prolonged and sliced and when completed, allow to re-calculate returns.
class_docstr_tok: ["A","trajectory","of","interactions","with","a","RL","environment",".","Trajectories","are","created","when","interacting","with","an","RL","environment",".","They","can","be","prolonged","and","sliced","and","when","completed",",","allow","to","re-calculate","returns","."]
docstr: Take action in the last state, getting reward and going to new state.
docstr_tok: ["Take","action","in","the","last","state",",","getting","reward","and","going","to","new","state","."]
code: def extend(self, new_observation, mask=1, **kwargs):
      """Take action in the last state, getting reward and going to new state."""
      self._timesteps.append(
          TimeStepBatch(
              observation=self._last_observation, mask=mask, **kwargs
          )
      )
      self._last_observation = new_observation
  
imports: import collections
  import os
  import gin
  import gym
  import numpy
  from trax import fastmath
  from trax.rl import advantages
  from trax.supervised import training
label_desc: Use image node_id 10 for calling the Trajectory obj's underlying member method code with example usage: obj.extend(new_observation, mask) without return types