A take home that can be done in an hour or two is fine in my book. It’s problematic when they assume way too much background on the part of the interviewer. I had a take home from a small local embedded devices company want me to write a 2D DCT algorithm from first principles in C (absolutely no use of external libraries or code copied or based on any existing code) and I noped out pretty quickly. Unless it’s something I’ve done before, doing it honestly without consulting any existing code would probably take me days.