human
Solve the following python programming problem given the following code:
def _windows_shell(self, chan) : 
    import threading 
    stdout.write ('Line-buffered terminal emulation. Press F6 or ^Z to send EOF.\r
\r
') 
    def writeall(sock) : 
        while True : 
            data = sock.recv (256) 
            if (not data) : 
                stdout.write ('\r
*** EOF ***\r
\r
') 
                stdout.flush () 
                break 
stdout.write (data) 
            stdout.flush () 
writer = threading.Thread (target = writeall, args = (writer,)) 
    writer.start () 
    try : 
        while True : 
            d = stdin.read (1) 
            if (not d) : 
                break 
chan.send (d) 
except EOFError : 
        pass 

    
    

    Fix the buggy line: writer = threading.Thread (target = writeall, args = (writer,))
assistant
#Here is Python code to fix the buggy line: writer = threading.

writer = threading.Thread (target = writeall, args = (chan,))