

def sum_of_left_leaves(root):
    count = 0
    if root is not None:
        if root is not None:
            if root.left is not None:
                if root.left.right is None and root.left.left is None:
                    count += root.left.value
                else:
                    count += sum_of_left_leaves(root.left)
            if root.right is not None:
                count += sum_of_left_leaves(root.right)
    return count
