def no_duplicates(route):
    """
    This function removes duplicate nodes that may be present in a route, ensuring it can be plotted.

    Parameters
    ----------
    route : list
        list of nodes traversed by route, in order

    Returns
    -------
    route : list
        list of nodes traversed by route, in order, with any immediate duplicates removed
    """
    for i in range(len(route)-2):
        if route[i] == route[i+1]:
            del route[i]
    return route