comefrom: <doocs>2331.Evaluate Boolean Binary Tree_1.py
code: def dfs(root):
      if root.left is None and root.right is None:
          return bool(root.val)
      l, r = dfs(root.left), dfs(root.right)
      return (l or r) if root.val == 2 else (l and r)
masked: def sample_funcname ( var_1 ) :
      if var_1.left is None and var_1.right is None :
          return bool ( var_1.val )
      var_7 , var_8 = var_0 ( var_1.left ) , var_0 ( var_1.right )
      return ( var_7 or var_8 ) if var_1.val == 2 else ( var_7 and var_8 )
  