def get_colours_extend(graph_size, start_set, end_set, source, target, reachable=None):
    """
    Get colours for nodes including source and target nodes.

    Blue nodes are those in the source set.
    Orange nodes are those in the start set, not in the source set.
    Green nodes are those reachable from the source that are in target.
    Red nodes are those in target that are not reachable from the source.
    All other nodes are grey.

    """
    # Setup the colours
    c = []
    if reachable is None:
        reachable = end_set
    for acc_val in range(graph_size):
        if acc_val in start_set:
            if acc_val in source:
                c.append("dodgerblue")
            else:
                c.append("darkorange")
        elif acc_val in target:
            if acc_val in reachable:
                c.append("g")
            else:
                c.append("r")
        else:
            c.append("gray")
    return c