<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def private_messenger():
 """ Thread which runs in parallel and constantly checks for new messages in the private pipe and sends them to the specific client. If client is not connected the message is discarded. """

    while __websocket_server_running__:
        pipein = open(PRIVATE_PIPE, 'r')
        line = pipein.readline().replace('\n', '').replace('\r', '')
        if line != '':
            message = json.loads(line)
            WebSocketHandler.send_private_message(user_id=message['user_id'],
                                                  message=message)
            print line
            
            remaining_lines = pipein.read()
            pipein.close()
            pipeout = open(PRIVATE_PIPE, 'w')
            pipeout.write(remaining_lines)
            pipeout.close()
        else:
            pipein.close()
        
        time.sleep(0.05)