I had a spaniel mix many years ago I named Fred but we (friends, family) all called him 'Freddie the Wonder Pup'.
He was the hands down smartest dog any of us had ever seen and that still holds true to today.
Anyway, the back yard had an alley and big gate, and the front was just a little chain link door wide gate, just inside that gate was the kitchen 'back door' and it a had a doggie door for Freddie.
10' around the corner from that was my gas meter.
So I come home one day and as I go in the gate I hear this female voice just around the corner in back calling out Hello? Hello? Anyone there?
So I walk around back and here is this petite pretty young gal in a meter reader outfit sitting on my gas meter with Freddie sitting a couple of feet away.
Her story in short was she typically just uses binoculars to look over the fence or through the gate to read the meter from the alley but I had a rag on it and it obscured the readout.
She went on to say Fred seemed like a very pleasant non-threading dog which was indeed him temperament, so she came through the gate and moved the rag to get the gas meter reading with absolutely no problems from Freddie, until she went to leave...
Freddie sat himself between her and the gate, and when she tried to go that direction he gave her a warning growl.
She went on to say she would sit down on the meter, Freddie would relax, even come and be friendly and she'd pet him and talk all nice but as soon as she would try to leave Freddie would again insist she stay.
Apparently this game went on for about 45 minutes before I got home but she said she never really felt afraid, more pissed he wouldn't let her leave.
I got Fred as a little puppy from the pound and as I trained him the basics and he grew I knew he was a damn smart dog and he would do all kinds of cool things like big service dogs do (get me a beer from the frig for example).
When I came around back to explore the voice Freddie just stayed put until I went up and talked to the gal and of course as soon as I told Freddie 'it's OK' he left his post as she was now a new friend and as she pet Fred she scolded me for obstructing her view of my meter, then departed as she had entered with a friendly escort.
I can't explain this, I didn't teach him to do that, but I was single at the time and I'm going with he thought I might want to meet this new pretty young gal that came to our house and insisted she stay until I checked her out ;-}