def get_path_from_finish(current):
    """Traces back the path through parent-nodes"""

    backwards = []
    while current:
        backwards.append(current.location)
        current = current.parent
    backwards.reverse()
    return backwards