“The Lady in the Van” is the story of a codependent London couple who politely loathe each other without actually being a pair. She is Miss Shepherd, a homeless gorgon with delusions of grandeur, and a long-term driveway squatter in several comedic ramshackle vehicles. He is English playwright Alan Bennett, a timid fellow who feels the impulse to strangle his caustic guest every time he offers her aid.

The reality-based comedy hands the roles to the peerless Maggie Smith and Alex Jennings, who make their 15-year run of neighborly aversion into an ongoing border war delivered in classic British understatement.

It’s a good enough story that Bennett has written it as a memoir, a stage play and a radio drama, with Smith in the title role. Her third run as the haughty eccentric is a matter of Olympic marksmanship, hitting the bull’s-eye with each scowl and droll line reading.

The pair meet in a rising London neighborhood in 1973, as the introverted playwright is beginning to climb the city’s creative totem pole. He offers the aged neighborhood icon a long-term parking space in front of his house. When she makes it a permanent arrangement, he is too polite to object. He’s also more than a bit lonely and feeling guilt pangs at ignoring his own failing mother’s increasing needs.

The film follows the pair as they develop a frenemies relationship that each one wishes to control. Bennett also wishes he could balance his own imaginary doppelgängers, seeing himself divided into the Alan who writes and the Alan who lives. Jennings is enjoyable playing this two-member debate club, dual personas whose closest connection is their mutual interest in the mysteries of Miss Shepherd’s past. It is a complicated saga dating back to World War II, two terms as a nun and a long-ago scandal still drawing police attention.

The story grows stranger over the years, building to a final chapter where director Nicholas Hytner echoes Monty Python’s “Life of Brian” with a meta-climax where Bennett’s impersonator and actual self split the screen like Jennings’ imaginary twins.

It’s a silly, far from perfect film, but uses Smith, a genuine national treasure and double Oscar winner, far better than those dreadful “Marigold Hotel” movies do. Better to see it than miss it.