<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def free_register(self, reg):

 """Releases working register"""

        if reg not in self.used_registers:
            self.error("register %s is not taken" % self.REGISTERS[reg])
        self.used_registers.remove(reg)
        self.free_registers.append(reg)
        self.free_registers.sort(reverse = True)