def _clear_gateway_data(self):
    one_week_ago = (datetime.datetime.utcnow() - datetime.timedelta(days=7))
    to_remove = [index for (index, dt) in enumerate(self._resumes) if (dt < one_week_ago)]
    for index in reversed(to_remove):
        del self._resumes[index]
    for (shard_id, dates) in self._identifies.items():
        to_remove = [index for (index, dt) in enumerate(dates) if (dt < one_week_ago)]
        for index in reversed(to_remove):
            del dates[index]
def _clear_gateway_data(self):
    one_week_ago = (datetime.datetime.utcnow() - datetime.timedelta(days=7))
    to_remove = [index for (index, dt) in enumerate(self._resumes) if (dt < one_week_ago)]
    for index in reversed(to_remove):
        del self._resumes[index]
    for (shard_id, dates) in self._identifies.items():
        to_remove = [index for (index, dt) in enumerate(dates) if (dt < one_week_ago)]
        for index in reversed(to_remove):
            del dates[index]