First_level_from_bids function mixing derivatives data with raw data?

In the implementation of the function nilearn.glm.first_level.first_level_from_bids(), imaging files are read from the provided derivatives folder whereas events are read from the bids raw folder. Is this behavior covered by the bids spec, i.e. mixing raw data files with derivatives files or is it common practice to mix derivatives and raw data in analysis pipelines?

This is what I would expect. Preprocessing tools typically do not modify events, so if preprocessed data do not include events, then I would resort to the raw data to understand a dataset.

I see. It seems I was confused because the derivatives folder has to exist but still can be empty for first_level_from_bids() to execute.