In "Hector and the search for Happiness", there is a dog that Hector keeps referring to, throughout the movie. The dog has no name, and doesn't appear to be real (either Hector's imagination or a memory from his childhood). And is only used in certain situations, like Hector talking to himself or perhaps as a means of talking indirectly to the audience.
My question is kind of a two-parter; what is this mechanic called, and what is it used for?