"Pull yer finger out!"

I know it means to 'get on with things', to 'quit shirking what you have to do', but what was the finger in? and where did it have to be pulled out of in order to do get on with things?

Just a thought ...