def METHOD_NAME(
    self,
    final_state: ResourceState,
    start_time: float,
    transition_duration: float,
    final_state_message: str,
) -> "TimedMessage":
    """Update the state while the resource is in a transitional state"""
    now = time.time()
    transition_time = now - start_time
    transition_time_remaining = transition_duration - transition_time
    if transition_time_remaining < 0:
        return replace(
            self,
            status=replace(
                self.status,
                state=final_state,
                message=final_state_message,
            ),
        )
    else:
        message = (
            f"Resource is still {self.status.state.value}. "
            f"{transition_time_remaining}s remain."
        )
        logger.info(message)
        return replace(
            self,
            status=replace(
                self.status,
                state=self.status.state,
                message=message,
            ),
        )