def _reset(self, indices):
    """Resets environments at indices shouldn't pre-process or record.

    Args:
      indices: list of indices of underlying envs to call reset on.

    Returns:
      np.ndarray of stacked observations from the reset-ed envs.
    """
    # This returns a numpy array with first dimension `len(indices)` and the
    # rest being the dimensionality of the observation.

    num_envs_to_reset = len(indices)
    observations = [None] * num_envs_to_reset

    def reset_at(idx):
      observations[idx] = self._envs[indices[idx]].reset()

    if self._parallelism > 1:
      self._pool.map(reset_at, range(num_envs_to_reset))
    else:
      for i in range(num_envs_to_reset):
        reset_at(i)

    return _stack(observations)
Resets environments at indices shouldn't pre-process or record.

    Args:
      indices: list of indices of underlying envs to call reset on.

    Returns:
      np.ndarray of stacked observations from the reset-ed envs.
    
tensor2tensor/envs/gym_env_problem.py