class_docstr: Basically a batch of active trajectories and a list of completed ones.
class_docstr_tok: ["Basically","a","batch","of","active","trajectories","and","a","list","of","completed","ones","."]
docstr: Completes the given trajectory at the given index.
code: def _complete_trajectory(self, trajectory, index):
      """Completes the given trajectory at the given index."""
  
      assert isinstance(trajectory, Trajectory)
  
      # This *should* be the case.
      assert trajectory.last_time_step.action is None
  
      # Add to completed trajectories.
      self._completed_trajectories.append(trajectory)
  
      # Make a new one to replace it.
      self._trajectories[index] = Trajectory()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import pickle
  import re
  import sys
  import time
  from absl import logging
  import cloudpickle
  import numpy
  from tensor2tensor.envs import time_step
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling the BatchTrajectory obj's underlying member method code with example usage: obj._complete_trajectory(trajectory, index) without return types