rack [ransack] one's brains (for fresh ideas or apt expressions); beat [cudgel] one's brains; rack one's brains (to do ...); scratch through one's mind for sth. -- a self-depreciatory phrase of a man of letters; think hard:
I have ground out some verses, which, I'm afraid, are too mediocre to appear in your publication.