def METHOD_NAME(mask_img):
    """Test if raises an error when empty list of provided."""
    dict_learning = DictLearning(mask=mask_img, n_components=3)
    with pytest.raises(
        ValueError,
        match="Need one or more Niimg-like objects "
        "as input, an empty list was given.",
    ):
        dict_learning.fit([])