Given a binary tree, write a function to perform a depth-first traversal. Return the node values in preorder: visit the current node, then its left subtree, then its right subtree. Use None for an empty tree and represent each node as a dictionary with val, left, and right keys. Implement def dfs_traversal(root): and return a list of values.
valdef dfs_traversal(root):