def METHOD_NAME(self, message):
    for required_field in ("id", "job_id"):
        if required_field not in message:
            raise StatusMsgMissingDataError(required_field)
    job_id = message.get("job_id")
    if job_id != self.job_id:
        LOG.warning("Received a message destined for a different job: %s", message)
        return
    message.pop("job_id")
    self._update_status(message)
    handlers = {
        "started": self._handle_task_started,
        "finished": self._handle_task_finished,
    }
    meth = handlers.get(message.get("status"), self._set_task_data)
    meth(message)