def METHOD_NAME() -> None:
    """Test validate_task_res."""
    task_res = TaskRes(task=Task())
    assert validate_task_res(task_res)
    task_res.task_id = "123"
    assert not validate_task_res(task_res)
    task_res.Clear()
    task_res.group_id = "123"
    assert not validate_task_res(task_res)
    task_res.Clear()
    task_res.workload_id = "123"
    assert not validate_task_res(task_res)
    task_res.Clear()
    # pylint: disable-next=no-member
    task_res.task.producer.node_id = 0
    assert not validate_task_res(task_res)
    task_res.Clear()
    # pylint: disable-next=no-member
    task_res.task.consumer.node_id = 0
    assert not validate_task_res(task_res)
    task_res.Clear()
    # pylint: disable-next=no-member
    task_res.task.ancestry.append("123")
    assert not validate_task_res(task_res)