def get_times(annot, evt_type=None, stage=None, cycle=None, chan=None,
              exclude=False, buffer=0):
    getter = annot.get_epochs
    last = annot.last_second
    if stage is None:
        stage = (None,)
    if cycle is None:
        cycle = (None,)
    if chan is None:
        chan = (None,)
    if evt_type is None:
        evt_type = (None,)
    elif isinstance(evt_type[0], str):
        getter = annot.get_events
        if chan != (None,):
            chan.append('')
    else:
        lg.error('Event type must be list/tuple of str or None')
    qual = None
    if exclude:
        qual = 'Good'
    bundles = []
    for et in evt_type:
        for ch in chan:
            for cyc in cycle:
                for ss in stage:
                    st_input = ss
                    if ss is not None:
                        st_input = (ss,)
                    evochs = getter(name=et, time=cyc, chan=(ch,),
                                    stage=st_input, qual=qual)
                    if evochs:
                        times = [(
                                max(e['start'] - buffer, 0), 
                                min(e['end'] + buffer, last)) for e in evochs]
                        times = sorted(times, key=lambda x: x[0])
                        one_bundle = {'times': times,
                                      'stage': ss,
                                      'cycle': cyc,
                                      'chan': ch,
                                      'name': et}
                        bundles.append(one_bundle)
    return bundles