def forward_pass(output_node, sorted_nodes):
    """
    Network forward propagation.

    Performs a forward pass through a list of sorted nodes.

    Arguments:
        'output_node': The output node in the graph.
        'sorted_nodes': A topologically sorted list of nodes.

    Returns the value of the output node.
    """

    for n in sorted_nodes:
        n.forward()

    return output_node.value