parameters: (self, root)
return_statement: return total%2 == 0 and (total/2) in lookup
docstring: :type root: TreeNode
          :rtype: bool
docstring_summary: :type root: TreeNode
          :rtype: bool
docstring_tokens: : type root : TreeNode : rtype : bool
function: def checkEqualTree(self, root):
          """
          :type root: TreeNode
          :rtype: bool
          """
          def getSumHelper(node, lookup):
              if not node:
                  return 0
              total = node.val + \
                      getSumHelper(node.left, lookup) + \
                      getSumHelper(node.right, lookup)
              lookup[total] += 1
              return total
  
          lookup = collections.defaultdict(int)
          total = getSumHelper(root, lookup)
          if total == 0:
              return lookup[total] > 1
          return total%2 == 0 and (total/2) in lookup
function_tokens: def checkEqualTree ( self , root ) : def getSumHelper ( node , lookup ) : if not node : return 0 total = node . val + getSumHelper ( node . left , lookup ) + getSumHelper ( node . right , lookup ) lookup [ total ] += 1 return total lookup = collections . defaultdict ( int ) total = getSumHelper ( root , lookup ) if total == 0 : return lookup [ total ] > 1 return total % 2 == 0 and ( total / 2 ) in lookup