if left or right child of root is ' x ' , then add the root ' s ▁ data ▁ to ▁ ' Sum '
if ( ( root . left and root . left . data == x ) or ( root . right and root . right . data == x ) ) : NEW_LINE INDENT Sum [ 0 ] += root . data NEW_LINE DEDENT