input: Write a python function to perform Depth First Search (DFS) traversal on a binary tree.
  assert dfs(TreeNode(1, TreeNode(2), TreeNode(3)))==[1,2,3]
  assert dfs(TreeNode(1, TreeNode(2, TreeNode(4), TreeNode(5)), TreeNode(3)))==[1,2,4,5,3]
  assert dfs(TreeNode(1, TreeNode(2, TreeNode(4)), TreeNode(3, None, TreeNode(5))))==[1,2,4,3,5]
output: def dfs(root):
      if not root:
          return []
      
      stack, result = [root], []
      
      while stack:
          node = stack.pop()
          result.append(node.val)
          if node.right:
              stack.append(node.right)
          if node.left:
              stack.append(node.left)
      
      return result
  
  class TreeNode:
      def __init__(self, val=0, left=None, right=None):
          self.val = val
          self.left = left
          self.right = right