<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cancel(self, task_id):
 """ Takes an existing task & cancels it before it is processed. Returns the canceled task, as that could be useful in creating a new task. Ex:: task = gator.task(add, 18, 9) # Whoops, didn't mean to do that. gator.cancel(task.task_id) :param task_id: The identifier of the task to process :type task_id: string :returns: The canceled ``Task`` instance """

        data = self.backend.get(self.queue_name, task_id)

        if data:
            task = self.task_class.deserialize(data)
            task.to_canceled()
            return task