<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _classify_no_operation(self, regs_init, regs_fini, mem_fini, written_regs, read_regs):
 """Classify no-operation gadgets. """

        # TODO: Flags should be taken into account

        matches = []

        # Check that registers didn't change their value.
        regs_changed = any(regs_init[r] != regs_fini[r] for r in regs_init)

        # Check that flags didn't change their value.
        flags_changed = False

        # Check that memory didn't change.
        mem_changed = mem_fini.get_write_count() != 0

        if not regs_changed and not flags_changed and not mem_changed:
            matches.append({
                "op": "nop",
            })

        return matches