comefrom: <doocs>0543.Diameter of Binary Tree_1.py
code: def dfs(root):
      if root is None:
          return 0
      nonlocal ans
      left, right = dfs(root.left), dfs(root.right)
      ans = max(ans, left + right)
      return 1 + max(left, right)
masked: def sample_funcname ( var_1 ) :
      if var_1 is None :
          return 0
      nonlocal var_4
      left , right = var_0 ( var_1.left ) , var_0 ( var_1.right )
      var_4 = max ( var_4 , left + right )
      return 1 + max ( left , right )
  