code: def backtrace(node):
      
      path = [(node.x, node.y)]
      while node.parent:
          node = node.parent
          path.append((node.x, node.y))
      path.reverse()
      return path
docs: Backtrace according to the parent records and return the path.
      (including both start and end nodes)