def concatenate_datasets(
    datasets: Sequence["data.AnomalibDataset"],
) -> "data.AnomalibDataset":
    """Concatenate multiple datasets into a single dataset.

    Args:
        datasets: Sequence of at least two datasets to concatenate

    Returns:
        Combined dataset containing samples from all input datasets

    Example:
        >>> combined = concatenate_datasets([dataset1, dataset2])
        >>> len(combined) == len(dataset1) + len(dataset2)
        True
    """
    concat_dataset = datasets[0]
    for dataset in datasets[1:]:
        concat_dataset += dataset
    return concat_dataset
Concatenate multiple datasets into a single dataset.

    Args:
        datasets: Sequence of at least two datasets to concatenate

    Returns:
        Combined dataset containing samples from all input datasets

    Example:
        >>> combined = concatenate_datasets([dataset1, dataset2])
        >>> len(combined) == len(dataset1) + len(dataset2)
        True
    
src/anomalib/data/utils/split.py