def METHOD_NAME(self):
    if self.use_customized_hierarchical:
        self.customized_cleanup_process_group()
    else:
        self.trainer_dist_adapter.cleanup_pg()
        logging.info(
            "Training finished for slave client rank %s in silo %s"
            % (self.args.proc_rank_in_silo, self.args.rank_in_node)
        )
    self.finished = True