The same as this issue in phys2bids (https://github.com/physiopy/phys2bids/issues/465) but implement for this repo