We can combine functions here and get rid of some duplicate logic. If bool(len(candidate_saved_searches_in_view)>0) would return the exact same thing as employer_can_view_candidate. Push the employer microsite queries back into that helper function and rename it (candidate_searches_viewable_by_employer(employer, candidate) or something)