def guess_y(ds, default=None):
    """Given a dataset, guess the dependent variable"""
    for y in ('srcm', 'src', 'meg', 'eeg'):
        if y in ds:
            return y
    if default is not None:
        return default
    raise RuntimeError('Could not find data in {ds}')
