import snoop


def f4(x4):
    result4 = snoop.pp(x4 * 2)
    return result4


def f3(x3):
    result3 = f4(x3)
    return result3


def f2(x2):
    result2 = f3(x2)
    return result2


@snoop(depth=3)
def main():
    result1 = f2(8)
    return result1


if __name__ == '__main__':
    main()


expected_output = """
12:34:56.78 >>> Call to main in File "/path/to_file.py", line 20
12:34:56.78   20 | def main():
12:34:56.78   21 |     result1 = f2(8)
    12:34:56.78 >>> Call to f2 in File "/path/to_file.py", line 14
    12:34:56.78 ...... x2 = 8
    12:34:56.78   14 | def f2(x2):
    12:34:56.78   15 |     result2 = f3(x2)
        12:34:56.78 >>> Call to f3 in File "/path/to_file.py", line 9
        12:34:56.78 ...... x3 = 8
        12:34:56.78    9 | def f3(x3):
        12:34:56.78   10 |     result3 = f4(x3)
        12:34:56.78 LOG:
        12:34:56.78 .... x4 * 2 = 16
        12:34:56.78 .......... result3 = 16
        12:34:56.78   11 |     return result3
        12:34:56.78 <<< Return value from f3: 16
    12:34:56.78   15 |     result2 = f3(x2)
    12:34:56.78 .......... result2 = 16
    12:34:56.78   16 |     return result2
    12:34:56.78 <<< Return value from f2: 16
12:34:56.78   21 |     result1 = f2(8)
12:34:56.78 .......... result1 = 16
12:34:56.78   22 |     return result1
12:34:56.78 <<< Return value from main: 16
"""

@@ -196,24 +196,25 @@
 epth=3)%0Adef 
+_
 main():%0A    
@@ -250,16 +250,223 @@
 sult1%0A%0A%0A
+def main():%0A    import snoop.pp_module%0A    before = snoop.pp_module.NO_ASTTOKENS%0A    snoop.pp_module.NO_ASTTOKENS = True%0A    try:%0A        _main()%0A    finally:%0A        snoop.pp_module.NO_ASTTOKENS = before%0A%0A%0A
 if __nam
@@ -543,16 +543,17 @@
 Call to 
+_
 main in 
@@ -604,24 +604,25 @@
    20 %7C def 
+_
 main():%0A12:3
@@ -1073,22 +1073,26 @@
 78 .... 
-x4 * 2
+%3Cargument%3E
  = 16%0A  
@@ -1546,16 +1546,17 @@
 ue from 
+_
 main: 16

Fix depth test with no asttokens