def _get_and_verify_data_sizes(data, n_signals=None, n_times=None, times=None):
    if not isinstance(data, (list, tuple)):
        raise ValueError('data has to be a list or tuple')
    n_signals_tot = 0
    for this_data in data:
        this_n_signals, this_n_times = this_data.shape
        if n_times is not None:
            if this_n_times != n_times:
                raise ValueError('all input time series must have the same '
                                 'number of time points')
        else:
            n_times = this_n_times
        n_signals_tot += this_n_signals

        if hasattr(this_data, 'times'):
            this_times = this_data.times
            if times is not None:
                if np.any(times != this_times):
                    warn('time scales of input time series do not match')
            else:
                times = this_times

    if n_signals is not None:
        if n_signals != n_signals_tot:
            raise ValueError('the number of time series has to be the same in '
                             'each epoch')
    n_signals = n_signals_tot

    return n_signals, n_times, times


# map names to estimator types
Set the display mode for this screen.
dataset/ETHPy150Open mne-tools/mne-python/mne/connectivity/spectral.py/_get_and_verify_data_sizes--crossover with--dataset/ETHPy150Open ardekantur/pyglet/pyglet/canvas/base.py/Screen.set_mode