Given a binary tree, calculate the sum of all left leaves.
Represent each node as a dictionary with val, left, and right keys, where an absent child is None. Implement sum_of_left_leaves(root) and return an integer. A left leaf has no children and is the left child of its parent.
def sum_of_left_leaves(root):
val, left, and right.None.def sum_of_left_leaves(root):