<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def has_reg(self, reg_name):
 """Check if a register is used in the instruction."""

        return any(operand.has_reg(reg_name) for operand in self.operands)