The film is an animated adaptation of the 1971 film Willy Wonka & the Chocolate Factory (which in turn is based on the book Charlie and the Chocolate Factory by Roald Dahl) with the addition of Tom and Jerry as characters and seen through Tom and Jerry : Willy Wonka and the Chocolate Factory's point of view.
Head entity: Charlie and the Chocolate Factory
Tail entity: Tom and Jerry: Willy Wonka and the Chocolate Factory
Relation (head \u2192 tail): based on
Inverse relation (tail \u2192 head): derivative work