code: def on_trial_complete(self,
                            trial_id,
                            result=None,
                            error=False,
                            early_terminated=False):
          
          if result:
              self.optimizer.register(
                  params=self._live_trial_mapping[trial_id],
                  target=result[self._reward_attr])
  
          del self._live_trial_mapping[trial_id]
docs: Passes the result to BayesOpt unless early terminated or errored