How could we know about spaces and levels

def display_keys(node, space='\t', level=0):
    # print(node.key if node else None, level)
    # If the node is empty
    if node is None:
        print(space*level + '∅')
    # If the node is a leaf 
    if node.left is None and node.right is None:
        print(space*level + str(node.key))
    # If the node has children
    display_keys(node.right, space, level+1)
    print(space*level + str(node.key))
    display_keys(node.left,space, level+1)    

How could we know about levels in this code can anyone help me come out through this problem