Original: It is preceded by "Golden Slumbers", and segues into "The End".
Simplified: Two years later, they did the same for the movie version of Sgt. Peppers Lonely Hearts Club Band.