Take a look at how sklearn handling is done in mne/preprocessing/ica.py