def METHOD_NAME(listener):
    # verify that the makefile and the socket are truly independent
    # by closing the made file and then sending a character
    try:
        conn, _ = listener.accept()
        fd = conn.makefile(mode='wb')
        fd.write(b'hello')
        fd.close()
        conn.send(b'\n')
        conn.close()
        _write_to_closed(fd, b'a')
        self.assertRaises(socket.error, conn.send, b'b')
    finally:
        listener.close()