def _conversations(group, delta=datetime.timedelta(hours=1)):
    last_time = None
    results = []
    for g in group:
        if last_time is None or g.datetime - last_time < delta:
            if g.interaction == 'text':
                results.append(g)
            else:
                if len(results) != 0:
                    yield results
                    results = []
        else:
            if len(results) != 0:
                yield results
            if g.interaction == 'call':
                results = []
            else:
                results = [g]
        last_time = g.datetime
    if len(results) != 0:
        yield results