input: Write a python function to search a path to a given key in a binary tree.
  assert search_path(root, 5)==[10, 5]
  assert search_path(root, 15)==[10, 20, 15]
  assert search_path(root, 7)==[10, 5, 7]
output: def search_path(root, key):
      def dfs(node, path):
          if not node:
              return None
          path.append(node.val)
          if node.val == key:
              return path
          left_search = dfs(node.left, path[:])
          if left_search:
              return left_search
          right_search = dfs(node.right, path[:])
          if right_search:
              return right_search
          return None
  
      return dfs(root, [])