def wait_for_attach(timeout=None): """If a remote debugger is attached, returns immediately. Otherwise, blocks until a remote debugger attaches to this process, or until the optional timeout occurs. Parameters ---------- timeout : float, optional The timeout for the operation in seconds (or fractions thereof). """ debugger_attached.wait(timeout)