code: def _start_trial(self, trial, checkpoint=None):
          
          prior_status = trial.status
          self.set_status(trial, Trial.RUNNING)
          trial.runner = self._setup_runner(
              trial,
              reuse_allowed=checkpoint is not None
              or trial._checkpoint.value is not None)
          if not self.restore(trial, checkpoint):
              if trial.status == Trial.ERROR:
                  raise RuntimeError(
                      "Restore from checkpoint failed for Trial {}.".format(
                          str(trial)))
  
          previous_run = self._find_item(self._paused, trial)
          if (prior_status == Trial.PAUSED and previous_run):
              # If Trial was in flight when paused, self._paused stores result.
              self._paused.pop(previous_run[0])
              self._running[previous_run[0]] = trial
          else:
              self._train(trial)
docs: Starts trial and restores last result if trial was paused.
  
          Raises:
              ValueError if restoring from checkpoint fails.