Can you describe inorder, preorder, and postorder tree traversals?
Implement all three traversals for a binary tree. The input is a nested dictionary with keys val, left, and right, or None for an empty subtree. Return a dictionary containing the node values in inorder, preorder, and postorder order. Each traversal should visit every node exactly once.
def tree_traversals(root):