Refactor duplicate line out of tuples_for