'Interpolate bad MEG and EEG channels.
Operates in place.
Parameters
reset_bads : bool
If True, remove the bads from info.
mode : str
Either `\'accurate\'` or `\'fast\'`, determines the quality of the
Legendre polynomial expansion used for interpolation of MEG
channels.
Returns
inst : instance of Raw, Epochs, or Evoked
The modified instance.
Notes
.. versionadded:: 0.9.0'

def interpolate_bads(self, reset_bads=True, mode='accurate'):

    from .interpolation import _interpolate_bads_eeg, _interpolate_bads_meg
    if (getattr(self, 'preload', None) is False):
        raise ValueError('Data    must    be    preloaded.')
    _interpolate_bads_eeg(self)
    _interpolate_bads_meg(self, mode=mode)
    if (reset_bads is True):
        self.info['bads'] = []
    return self
