The movie “Nanny McPhee Returns” is a lot like Nanny herself. It’s not always pretty to look at, but deep down it’s charming, funny and warm.

Emma Thompson reprises her role as the Mary Poppins-on-speed nanny who makes magic with the tap of her walking stick. She only appears at households in total disarray.

Such a household exists in the English countryside during World War II. Isabel (Maggie Gyllenhaal) is trying to run the family farm by herself while tending to three spirited children and a visiting niece and nephew. McPhee arrives to bring a little sanity to the chaos.

Director Susanna White, who’s mainly worked in television, creates a world at times as fanciful as “Babe” and at other times as dramatic as “Yanks,” from the absurdity of synchronized swimming pigs to the tragic consequences of war.

The elements work but the transitions from light to dark scenes can be jarring. Despite the unevenness, the film is good, but it would have been far better had White just stayed with the whimsical.

The cast is first-rate: Gyllenhaal, Ewan McGregor, Maggie Smith and Thompson. But it would have been better with a British actress, as Gyllenhaal struggles with the accent. And Smith and McGregor don’t have enough to do.

All can be forgiven because of Thompson’s complete transformation into the magical nanny. It’s not just the makeup; it’s Thompson’s total commitment to the role. She makes you believe that there are nannies in this world who can make pigs fly.

Credit part of that acting success to the fact Thompson also wrote the script based on the “Nurse Matilda” books by Christianna Brand. That meant Thompson could mold the role to suit her acting skills.

“Nanny McPhee Returns” suffers from some miscasting, a slight misdirection in tone and a little loose editing. Look past those flaws and you’ll find a story that will entertain kids and the kid in all of us.