<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def strace(device, trace_address, breakpoint_address):
 """Implements simple trace using the STrace API. Args: device (str):
 the device to connect to trace_address (int):
 address to begin tracing from breakpoint_address (int):
 address to breakpoint at Returns: ``None`` """

    jlink = pylink.JLink()
    jlink.open()

    # Do the initial connection sequence.
    jlink.power_on()
    jlink.set_tif(pylink.JLinkInterfaces.SWD)
    jlink.connect(device)
    jlink.reset()

    # Clear any breakpoints that may exist as of now.
    jlink.breakpoint_clear_all()

    # Start the simple trace.
    op = pylink.JLinkStraceOperation.TRACE_START
    jlink.strace_clear_all()
    jlink.strace_start()

    # Set the breakpoint and trace events, then restart the CPU so that it
    # will execute.
    bphandle = jlink.breakpoint_set(breakpoint_address, thumb=True)
    trhandle = jlink.strace_code_fetch_event(op, address=trace_address)
    jlink.restart()
    time.sleep(1)

    # Run until the CPU halts due to the breakpoint being hit.
    while True:
        if jlink.halted():
            break

    # Print out all instructions that were captured by the trace.
    while True:
        instructions = jlink.strace_read(1)
        if len(instructions) == 0:
            break
        instruction = instructions[0]
        print(jlink.disassemble_instruction(instruction))

    jlink.power_off()
    jlink.close()