<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_trace(host='', port=5555, patch_stdstreams=False):
 """ Start the debugger This method suspends execution of the current script and starts a PDB debugging session. The web-interface is opened on the specified port (default: ``5555``). Example:: import web_pdb;web_pdb.set_trace() Subsequent :func:`set_trace` calls can be used as hardcoded breakpoints. :param host: web-UI hostname or IP-address :type host: str :param port: web-UI port. If ``port=-1``, choose a random port value between 32768 and 65536. :type port: int :param patch_stdstreams: redirect all standard input and output streams to the web-UI. :type patch_stdstreams: bool """

    pdb = WebPdb.active_instance
    if pdb is None:
        pdb = WebPdb(host, port, patch_stdstreams)
    else:
        # If the debugger is still attached reset trace to a new location
        pdb.remove_trace()
    pdb.set_trace(sys._getframe().f_back)