generalized method in gather.py to test student submissions