Fix C4-629: Rewrite uses of StopIteration, which is deprecated.
Fix C4-629: Rewrite uses of StopIteration, which is deprecated.

4dn-dcic/fourfront,hms-dbmi/fourfront,4dn-dcic/fourfront,hms-dbmi/fourfront,hms-dbmi/fourfront,hms-dbmi/fourfront,4dn-dcic/fourfront,4dn-dcic/fourfront,hms-dbmi/fourfront