It's absolutely astounding to me that people must entertain these at a sufficient rate that companies still try to pull this free labor nonsense. One company I interviewed with provided a take-home assignment and said to bill them for the hours; I found that to be a fair offer, although due to other circumstances limiting my available time, I declined to continue the interview at that point.
If the take-home assignment is expected to take a few hours, maybe it's worth considering. Any longer, and they can look elsewhere for free labor. That time is much better spent sending out more applications, networking, leetcoding for FANG interviews, working on personal projects, or simply taking a walk outside.