def METHOD_NAME(self, task):
    """Update info and log if needed. Returns True on state change."""
    if self.is_finished(task):
        return False
    last = task.task_info
    task.task_info = task.hub.taskactions.task_info(task.task_id, False)
    if task.task_info is None:
        print("No such task id: %s" % task.task_id)
        sys.exit(1)
    changed = False
    state = task.task_info["state"]
    if last:
        # compare and note status changes
        laststate = last["state"]
        if laststate != state:
            print("%s: %s -> %s" % (task, task.display_state(last),
                                    task.display_state(task.task_info)))
            changed = True
    else:
        # first time we're seeing this task, so just show the current state
        print("%s: %s" % (task, task.display_state(task.task_info)))
        changed = True
    # update all subtasks
    for key in sorted(self.subtask_dict.keys()):
        changed |= self.subtask_dict[key].METHOD_NAME()
    return changed