Consider the following Python code for a Binary Tree. What is the output of the function 'mystery_function'?
class Node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
def mystery_function(root):
if root is None:
return 0
left = mystery_function(root.left)
right = mystery_function(root.right)
return max(left, right) + 1
# Constructing the Binary Tree
root = Node(1)
root.left = Node(2)
root.right = Node(3)
root.left.left = Node(4)
root.left.right = Node(5)
print(mystery_function(root)) # Output?