Oh boy, this takes me down memory lane.

George Meliese's silent films and automatons were at the core of the beautifully illustrated and written YA novel from the mid-2000s named The Invention of Hugo Cabret [0].

[0] - https://en.wikipedia.org/wiki/The_Invention_of_Hugo_Cabret