Clean room is sufficient, but not necessary, btw. Humans can create legally distinct works after reviewing copyrighted code. The same principle probably extends to AI systems -- they have just learned on a much broader corpus than any one human.