@classmethod
def concat(cls, parts: Sequence['StepSequence'], data_format: Optional[str]=None, truncate_last: Optional[bool]=True):
    '\n        Concatenate multiple step sequences into one, truncating the last observation.\n\n        :param parts: batch of sequences to concatenate\n        :param data_format: torch to use Tensors, numpy to use ndarrays, `None` to choose automatically\n        :param truncate_last: remove the last step from each part, highly recommended to be `True`\n        :return: concatenated sequence of `Steps`\n        '
    data_names = parts[0].data_names
    if (data_format is None):
        data_format = parts[0].data_format
    data = {name: cat_to_format([ro.get_data_values(name, truncate_last) for ro in parts], data_format) for name in data_names}
    done = np.concatenate([ro.done for ro in parts])
    continuous = all((ro.continuous for ro in parts))
    rollout_bounds = None
    if continuous:
        rollout_bounds = [0]
        acc_len = 0
        for ro in parts:
            rollout_bounds.extend((ro.rollout_bounds[1:] + acc_len))
            acc_len += ro.rollout_bounds[(- 1)]
    return StepSequence(data_format=data_format, done=done, continuous=continuous, rollout_bounds=rollout_bounds, **data)
Concatenate multiple step sequences into one, truncating the last observation.

:param parts: batch of sequences to concatenate
:param data_format: torch to use Tensors, numpy to use ndarrays, `None` to choose automatically
:param truncate_last: remove the last step from each part, highly recommended to be `True`
:return: concatenated sequence of `Steps`
@classmethod
def concat(cls, parts: Sequence['StepSequence'], data_format: Optional[str]=None, truncate_last: Optional[bool]=True):
    '\n        Concatenate multiple step sequences into one, truncating the last observation.\n\n        :param parts: batch of sequences to concatenate\n        :param data_format: torch to use Tensors, numpy to use ndarrays, `None` to choose automatically\n        :param truncate_last: remove the last step from each part, highly recommended to be `True`\n        :return: concatenated sequence of `Steps`\n        '
    data_names = parts[0].data_names
    if (data_format is None):
        data_format = parts[0].data_format
    data = {name: cat_to_format([ro.get_data_values(name, truncate_last) for ro in parts], data_format) for name in data_names}
    done = np.concatenate([ro.done for ro in parts])
    continuous = all((ro.continuous for ro in parts))
    rollout_bounds = None
    if continuous:
        rollout_bounds = [0]
        acc_len = 0
        for ro in parts:
            rollout_bounds.extend((ro.rollout_bounds[1:] + acc_len))
            acc_len += ro.rollout_bounds[(- 1)]
    return StepSequence(data_format=data_format, done=done, continuous=continuous, rollout_bounds=rollout_bounds, **data)