def has_ffcv_support(datasets: List[AvalancheDataset]):
    """
    Checks if the support for FFCV was enabled for the given
    dataset list.

    This will 1) check if all the given :class:`AvalancheDataset`
    point to the same leaf dataset and 2) if the leaf dataset
    has the proper FFCV info setted by the :func:`enable_ffcv`
    function.

    :param dataset: The list of datasets.
    :return: True if FFCV can be used to load the given datasets,
        False otherwise.
    """
    try:
        flat_set = single_flat_dataset(concat_datasets(datasets))
    except Exception:
        return False

    if flat_set is None:
        return False

    leaf_dataset = flat_set[0]

    return hasattr(leaf_dataset, "ffcv_info")

    Checks if the support for FFCV was enabled for the given
    dataset list.

    This will 1) check if all the given :class:`AvalancheDataset`
    point to the same leaf dataset and 2) if the leaf dataset
    has the proper FFCV info setted by the :func:`enable_ffcv`
    function.

    :param dataset: The list of datasets.
    :return: True if FFCV can be used to load the given datasets,
        False otherwise.
    
avalanche/benchmarks/utils/ffcv_support/ffcv_components.py