<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def erase_lines(n=1):
 """ Erases n lines from the screen and moves the cursor up to follow """

    for _ in range(n):
        print(codes.cursor["up"], end="")
        print(codes.cursor["eol"], end="")