We've all been locked out of our houses before, whether you've immediately realized after shutting the door, or after spending an age rummaging in your bag.

There are a few standard options, which is get a spare set off someone else, retrieve a key you've hidden, break in somehow, or call a locksmith.

The latter options are usually the hardest, not to mention time-consuming and expensive.

But one woman was lucky enough to be able to enlist the help of a four-legged friend to help her gain access to her home.

The woman, referred to as Rachel, shared a clip to her TikTok account, @rachelannechap, as she and a friend realized they were locked out of a house.

"Have you got the key Rachel?" another woman, thought to be named Shel, says while trying the front door, as she replies: "No I thought you had."

Expletives follow, as Shel says: "Can you go through the window and open the door for me?"

Although it soon becomes clear she's addressing the dog that's with them. "She can't," Rachel says through laughter, as Shel insists: "She will. She can, trust me."

Shel tells the faithful pet to go and open the door, and she opens a window and lifts the dog, thought to be named Kiki, inside.

"Open the door," Shel trills, as moments after the dog enters the building, there's distinct scratching as the door miraculously opens.

The women clap and cheer, and clearly pleased with themselves, Kiki lets out a jubilant bark.

The clip, which can be seen here, was shared to the site on Wednesday, has been seen nearly 200,000 times as people were in awe at the dog's skills.

And explaining why the camera was rolling, Rachel said in a comment: "Actually I was filming something else at the time [and] turned around when my friend asked for key so negative."

The graph below, provided by Statista, shows the most popular dog breeds in the U.S.

Infographic: The Most Popular Dog Breeds in the U.S. | Statista You will find more infographics at Statista

Numerous people praised Kiki, as EmmaC joked: "That's not the first time the dog has had to do that."

Kellyrocks13 pointed out: "She understood the assignment."

Laur's raved: "Aww super smart dog! she deserves lots of treats for her rescue lol."

EmilyJade wrote: "Oh my god! Another reason why dogs are better than us. Bet she wouldn't have forgotten the keys!"

Kae wrote: "This is brilliant. I hope you gave that good girl lots of treats."

Although Elaine Hannan#vet asked: "What's the point in locking your door and leaving the window open."

Dogs are known for their loyalty and intelligence, with animals easily picking up basic commands like sit, stay and heel. Shows such as Crufts showcase what dogs are capable of with the right training and trainer.

But various breeds are used for specialist roles, such as bomb detecting, being a guide dog and even medical detection training.

A Medical Detection Dogs website, which trains dogs to aid people with Type 1 diabetes, Addison's disease and severe nut allergies, explained: "Dogs are trained using scent and breath samples collected from the client when they are experiencing an episode. The dogs are trained to identify the unique odours.

"Dogs are usually ready for advanced training and placement with their new owner at around 18 months old, but this depends on the dog and breed as they have to be mature enough to begin the process."

To train dogs it's best to start them early, the American Kennel Club (AKC), advising: "Keep training sessions short and fun. End each session on a positive note. If you feel your dog is having a difficult time learning or being "stubborn," evaluate the speed of your training and the value of your rewards."

Newsweek reached out to @rachelannechap for comment.

Do you have funny and adorable videos or pictures of your pet you want to share? We want to see the best ones! Send them in to life@newsweek.com and they could appear on our site.

File photo of dog by door.
File photo of dog by door. A woman's dog managed to unlock the door after she forgot her keys. StephM2506/Getty Images