<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _prune_penalty_box(self):
 """Restores clients that have reconnected. This function should be called first for every public method. """

        added = False
        for client in self.penalty_box.get():
            log.info("Client %r is back up.", client)
            self.active_clients.append(client)
            added = True
        if added:
            self._sort_clients()