move function out of nesting
move function out of nesting
factor out duplicate function
delete redundant boilerplate
dedupe inner function; fix indentation error
factor out duplicate function invocation
remove unduplicated comment
move generator functions out of repeated code
reindent
bring branches into greater conformity with each other
bring branches into greater conformity with each other
update comment
bring branches into greater conformity with each other
bring branches into greater conformity with each other
merge branches back together
remove duplicate query
be explicity about the error we are guarding against
pass table through as arg
fold broken out functions back together
remove redundant functions