code: def test_reset_some(self):
      bt = trajectory.BatchTrajectory(batch_size=self.BATCH_SIZE)
  
      indices = np.arange(self.BATCH_SIZE // 2)
      (
          observations,
          _,
          _,
          _,
      ) = self.get_random_observations_rewards_actions_dones(
          batch_size=self.BATCH_SIZE // 2
      )
  
      # Just reset the first half.
      bt.reset(indices, observations)
  
      # So first half are active, rest aren't.
      self.assertTrue(
          all(
              t.is_active
              for t in bt.trajectories[: self.BATCH_SIZE // 2]
          )
      )
      self.assertTrue(
          all(
              not t.is_active
              for t in bt.trajectories[self.BATCH_SIZE // 2 :]
          )
      )
  
      # Nothing is done anyways.
      self.assertEqual(0, bt.num_completed_trajectories)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import numpy
  from tensor2tensor.envs import time_step
  from tensor2tensor.envs import trajectory
  import tensorflow.compat.v1
  from tensorflow.compat.v1.io import gfile
label_desc: Use image node_id 5 for calling the BatchTrajectoryTest obj's underlying member method code with example usage: obj.test_reset_some() without return types