def _is_outdated_saved(path):
    """Data was saved in the old way if there are 'description.json', '-raw.fif'
    or '-epo.fif' in path (no subdirectories) OR if there are more 'fif' files
    than 'description.json' files."""
    description_files = glob(os.path.join(path, "**/description.json"))
    fif_files = glob(os.path.join(path, "**/*-raw.fif")) + glob(
        os.path.join(path, "**/*-epo.fif")
    )
    multiple = len(description_files) != len(fif_files)
    kwargs_in_path = any(
        [
            os.path.exists(os.path.join(path, kwarg_name))
            for kwarg_name in [
                "raw_preproc_kwargs",
                "window_kwargs",
                "window_preproc_kwargs",
            ]
        ]
    )
    return (
        os.path.exists(os.path.join(path, "description.json"))
        or os.path.exists(os.path.join(path, "0-raw.fif"))
        or os.path.exists(os.path.join(path, "0-epo.fif"))
        or multiple
        or kwargs_in_path
    )
Data was saved in the old way if there are 'description.json', '-raw.fif'
    or '-epo.fif' in path (no subdirectories) OR if there are more 'fif' files
    than 'description.json' files.
braindecode/datautil/serialization.py