<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_from_bits(self, value: int):
 """ Set the immediate value from machine code bits. Those are not sign extended, so it will take care of the proper handling. :param value: Value to set the immediate to :type value: int """

        if self.signed:
            value = -(value & self.tcmask) + (value & ~self.tcmask)
        self.set(value)