def test_trajectory_done_get_and_set(self):
    """Test that we can get and set the `done` flag of a trajectory."""
    tr = rl_task.Trajectory(observation=123)
    self._extend(tr)
    self.assertFalse(tr.done)
    tr.done = True
    self.assertTrue(tr.done)
Test that we can get and set the `done` flag of a trajectory.
trax/rl/task_test.py