I want to get back some code that I deleted in some commit some time ago. I don't remember what the code was at all, but I remembered that it did something very useful, but I deleted it because I thought I wouldn't need it. However, I now need that code back, but I only remember what function it was in.
Other information: the file containing that function also contains 500 lines of code total. There is a 30 commit range I know that the code appeared in at one point.
This question is a high level problem. How can I use the information I know to get the information I want?