def METHOD_NAME(self, pav_cfg, tests: List[TestRun],
         end_time: float, out_mode: str) -> None:
    """Wait on each of the given tests to complete, printing a status
    message """
    done_tests = []
    all_tests = list(tests)
    all_tests.sort(key=lambda t: t.full_id)
    tests = list(tests)
    status_time = time.time() + self.STATUS_UPDATE_PERIOD
    while tests and (end_time is None or time.time() < end_time):
        for test_state in tests:
            if test_state.complete:
                done_tests.append(test_state)
                tests.remove(test_state)
        # print status every 5 seconds
        if time.time() > status_time:
            status_time = time.time() + self.STATUS_UPDATE_PERIOD
            stats = status_utils.get_statuses(pav_cfg, all_tests)
            stats_out = []
            if out_mode == self.OUT_SILENT:
                pass
            elif out_mode == self.OUT_SUMMARY:
                states = {}
                for test_state in stats:
                    if test_state['state'] not in states.keys():
                        states[test_state['state']] = 1
                    else:
                        states[test_state['state']] += 1
                status_counts = []
                for state, count in states.items():
                    status_counts.append(state + ': ' + str(count))
                fprint(self.outfile, ' | '.join(status_counts), width=None, end='\r')
            else:
                for test_state in stats:
                    stat = [str(time.ctime(time.time())), ':',
                            'test #',
                            str(test_state['test_id']),
                            test_state['name'],
                            test_state['state'],
                            test_state['note'],
                            "\n"]
                    stats_out.append(' '.join(stat))
                fprint(self.outfile, ''.join(map(str, stats_out)), width=None)
    final_stats = status_utils.get_statuses(pav_cfg, tests)
    fprint(self.outfile, '\n')
    status_utils.print_status(final_stats, self.outfile)