<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _compute_mod_regs(self, regs_init, regs_fini):
 """Compute modified registers. """

        assert regs_init.keys() == regs_fini.keys()

        modified_regs = []

        for reg in regs_init:
            if regs_init[reg] != regs_fini[reg]:
                modified_regs.append(reg)

        return modified_regs