def _validate_write(self, data):
        update = 'id' in self.properties
        if 'version' not in data and update:
            data['version'] = self.version
        for key, value in six.iteritems(data.copy()):
            push_fn = self._push.get(key, False)

            if self._conds_for_removal(key, update, push_fn):
                del data[key]
                continue

            if push_fn is not None:
                data[key] = self._push[key](value)
            else:
                data[key] = value
        return data
Collapses a list of transition matrices (one per action) and a list 
dataset/ETHPy150Open MediaMath/t1-python/terminalone/entity.py/Entity._validate_write--crossover with--dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/learners/modelbased/policyiteration.py/collapsedTransitions