Is this function correct for implementation of invert the binary tree: 
def invert(root): 
  if not root: 
    return None
  (root.left,root.right)=(root.right,root.left) 
  root left=invert(root.left) 
  root.right=invert(root.right)
return root Provide the entire answer in JSON format.
user