<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_incoming_message(self, msg):
 """ Start or cancel a job, based on the msg. If msg.type == MessageType.START_JOB, then start the job given by msg.job. If msg.type == MessageType.CANCEL_JOB, then try to cancel the job given by msg.job.job_id. Args: msg (barbequeue.messaging.classes.Message):
 Returns: None """

        if msg.type == MessageType.START_JOB:
            job = msg.message['job']
            self.schedule_job(job)
        elif msg.type == MessageType.CANCEL_JOB:
            job_id = msg.message['job_id']
            self.cancel(job_id)