Making a New Keyframe for an Emit Value?

I need a function that will add a new key at the current frame for a certain material’s emit value. I don’t now much Python at all, so please help.