<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_from_tuple(self, the_tuple):
 """ Update task from tuple. """

        if not the_tuple.rowcount:
            raise Queue.ZeroTupleException("Error updating task")

        row = the_tuple[0]

        if self.task_id != row[0]:
            raise Queue.BadTupleException("Wrong task: id's are not match")

        self.state = row[1]
        self.data = row[2]