@fjarrett existing_records takes two parameters: $column (the record type we're looking for), and the table you want to query.  Based on the table requested, a differend DB query is run (note the difference in tables used in lines 280-284.  

Using GET BY, it searches the DB for the first occurance of each entry (ie, the first occurance of each author). It then outputs the results into an array to be used in assemble_results().

Does this answer your question?