def validate_stats(self):
        diff = self.ship.max_stats.diff(self.ship.base_stats)

        mapper = inspect(diff)
        for column in mapper.attrs:
            if column.key == "id": continue
            modern_value = getattr(self.modernized_stats, column.key)
            if modern_value is not None:
                diff_value = getattr(diff, column.key)
                if modern_value > diff_value:
                    setattr(self.stats, column.key, getattr(self.ship.max_stats, column.key))
                    setattr(self.modernized_stats, column.key, diff_value)
Generate a macro script with request objects
dataset/ETHPy150Open KanColleTool/kcsrv/db/ships.py/Kanmusu.validate_stats--crossover with--dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/plugins/macrocmds.py/generate_macro