Sentence:  A mild electrical shock <WSD>served</WSD> as a conditioned stimulus and was followed by feeding . 
Meaning of the word marked with <WSD> tags:  serve a purpose, role, or function