def check_prec(schedule):
    """
    Checks if a given schedule is acceptable following the order of precedence.
    
    Args:
        schedule (list): a list of jobs (node object) listed according to the schedule.
    
    Returns:
        (boolean): true if schedule follows order of precendence. False otherwise.
    """
    # Check first node.
    # First node in the schedule must be the start node of the graph
    if not schedule[0].start:
        return False

    # Check intermediate nodes.
    # Track jobs that have been executed. Dictates the subsequent allowable jobs.
    executed_list = [schedule[0]]
    for node in schedule[1:-1]:
        # If all predecessors (node.nodes_before) have been executed, current job is allowed.
        if all(before in executed_list for before in node.nodes_before):
            executed_list.append(node)
        # Otherwise, job cannot be executed.
        else:
            return False

    # Check end node.
    # Last node must be the end node of the graph.
    if not schedule[-1].end:
        return False

    # If all above conditions hold true, the schedule follows order of precednece.
    return True