def __len__(self):
    """Returns the number of observations in the trajectory."""
    # We always have 1 more of observations than of everything else.
    return len(self._timesteps) + 1
Returns the number of observations in the trajectory.
trax/rl/task.py