def METHOD_NAME(self, message: messages.MessageBase) -> None:
    if isinstance(message, TestResultMessage):
        self._process_test_result_message(message)
    elif isinstance(message, EnvironmentMessage):
        self._process_environment_message(message)
    else:
        raise LisaException(f"unsupported message received, {type(message)}")