def __getitem__(self, index):
    if (isinstance(index, slice) or isinstance(index, Iterable)):
        sliced_data = {name: self._slice_entry(self.__dict__[name], index) for name in self._data_names}
        sliced_data = {k: v for (k, v) in sliced_data.items() if (v is not None)}
        continuous = (isinstance(index, slice) and ((index.step is None) or (index.step == 1)))
        rollout_bounds = None
        if continuous:
            (start, end, _) = index.indices(self.length)
            rollout_bounds = [0]
            for b in self._rollout_bounds:
                if (start < b < end):
                    rollout_bounds.append((b - start))
            rollout_bounds.append((end - start))
        return StepSequence(rollout_info=self.rollout_info, data_format=self._data_format, done=self.done[index], continuous=continuous, rollout_bounds=rollout_bounds, **sliced_data)
    return Step(self, _index_to_int(index, self.length))
def __getitem__(self, index):
    if (isinstance(index, slice) or isinstance(index, Iterable)):
        sliced_data = {name: self._slice_entry(self.__dict__[name], index) for name in self._data_names}
        sliced_data = {k: v for (k, v) in sliced_data.items() if (v is not None)}
        continuous = (isinstance(index, slice) and ((index.step is None) or (index.step == 1)))
        rollout_bounds = None
        if continuous:
            (start, end, _) = index.indices(self.length)
            rollout_bounds = [0]
            for b in self._rollout_bounds:
                if (start < b < end):
                    rollout_bounds.append((b - start))
            rollout_bounds.append((end - start))
        return StepSequence(rollout_info=self.rollout_info, data_format=self._data_format, done=self.done[index], continuous=continuous, rollout_bounds=rollout_bounds, **sliced_data)
    return Step(self, _index_to_int(index, self.length))