def _close_epochs_event(events, params):
 info = params['info']
 exclude = [info['ch_names'].index(x) for x in info['bads'] if x.startswith('IC')]
 params['ica'].exclude = exclude

def _close_epochs_event ( events , params ) : info = params [ 'info' ] exclude = [ info [ 'ch_names' ] . index ( x ) for x in info [ 'bads' ] if x . startswith ( 'IC' ) ] params [ 'ica' ] . exclude = exclude
exclude the selected components on close .