def METHOD_NAME(self) -> AbstractTrainer:
    if self.trainer is not None:
        return self.trainer
    else:
        if self.trainer_path is None:
            raise AssertionError("Trainer does not exist.")
        # trainer_path is used to determine if there's a trained trainer
        # model_context contains the new trainer_path with updated context
        return self.trainer_type.load(path=self.model_context, reset_paths=self.reset_paths)  # noqa