def METHOD_NAME(self):
    """Finishes and closes the W&B run.
    Save run history data as field if configured to do that.
    """
    if self.save_run_history:
        history = self.wandb_run.history._data
        self.run_history = history
    if self.wandb_run is not None:
        self.wandb_run.METHOD_NAME()