def get_longest_parent(task):

    """
    Returns the parent of the given task which has the longest execution time

    Args:
        task (Node)

    Returns:
        Node
    """
    longest_parent = task.get_parents()[0]
    for parent in task.get_parents():
        if longest_parent.get_exec_time() < parent.get_exec_time():
            longest_parent = parent
    return longest_parent