def _translate_diff(self, new, changed, deleted):
        # validate this data makes sense
        error_format = 'please only send aggregated activities not %s'
        flat_changed = sum(map(list, changed), [])
        for aggregated_activity in itertools.chain(new, flat_changed, deleted):
            if not isinstance(aggregated_activity, AggregatedActivity):
                raise ValueError(error_format % aggregated_activity)

        # now translate the instructions
        to_remove = deleted[:]
        to_add = new[:]
        if changed:
            to_remove += [c[0] for c in changed]
            to_add += [c[1] for c in changed]
        return to_remove, to_add
<text>
dataset/ETHPy150Open tschellenbach/Stream-Framework/stream_framework/feeds/aggregated_feed/base.py/AggregatedFeed._translate_diff--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/plugins/Reply/plugin.py/Reply.notice