(self, trial_id: int, trial_state: TrialState)
Check whether a trial state is updatable.

        Args:
            trial_id:
                ID of the trial.
                Only used for an error message.
            trial_state:
                Trial state to check.

        Raises:
            :exc:`RuntimeError`:
                If the trial is already finished.
Check whether a trial state is updatable.
Check whether a trial state is updatable .
def check_trial_is_updatable(self, trial_id: int, trial_state: TrialState) -> None:
        """Check whether a trial state is updatable.

        Args:
            trial_id:
                ID of the trial.
                Only used for an error message.
            trial_state:
                Trial state to check.

        Raises:
            :exc:`RuntimeError`:
                If the trial is already finished.
        """
        if trial_state.is_finished():
            trial = self.get_trial(trial_id)
            raise RuntimeError(
                "Trial#{} has already finished and can not be updated.".format(trial.number)
            )
def check_trial_is_updatable ( self , trial_id : int , trial_state : TrialState ) -> None : if trial_state . is_finished ( ) : trial = self . get_trial ( trial_id ) raise RuntimeError ( "Trial#{} has already finished and can not be updated." . format ( trial . number ) )