def _adapt_lazy_stream(generator, transform_groups, initial_transform_group):
    """
    A simple internal utility to apply transforms and dataset type to all lazily
    generated datasets. Used in the :func:`create_lazy_generic_benchmark`
    benchmark creation helper.

    :return: A datasets in which the proper transformation groups and dataset
        type are applied.
    """

    for dataset in generator:
        dataset = _make_taskaware_classification_dataset(
            dataset,
            transform_groups=transform_groups,
            initial_transform_group=initial_transform_group,
        )
        yield dataset

    A simple internal utility to apply transforms and dataset type to all lazily
    generated datasets. Used in the :func:`create_lazy_generic_benchmark`
    benchmark creation helper.

    :return: A datasets in which the proper transformation groups and dataset
        type are applied.
    
avalanche/benchmarks/scenarios/deprecated/generic_benchmark_creation.py