<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _translate_sext(self, oprnd1, oprnd2, oprnd3):
 """Return a formula representation of a SEXT instruction. """

        assert oprnd1.size and oprnd3.size

        op1_var = self._translate_src_oprnd(oprnd1)
        op3_var, op3_var_constrs = self._translate_dst_oprnd(oprnd3)

        if oprnd3.size > oprnd1.size:
            result = smtfunction.sign_extend(op1_var, op3_var.size)
        elif oprnd3.size < oprnd1.size:
            raise Exception("Operands size mismatch.")
        else:
            result = op1_var

        return [op3_var == result] + op3_var_constrs