code: def test_trial_status_proto():
      assert (
          trial_module.TrialStatus.from_proto(
              trial_module.TrialStatus.to_proto(None)
          )
          is None
      )
      assert (
          trial_module.TrialStatus.from_proto(
              trial_module.TrialStatus.to_proto(
                  trial_module.TrialStatus.IDLE
              )
          )
          == trial_module.TrialStatus.IDLE
      )
      assert (
          trial_module.TrialStatus.from_proto(
              trial_module.TrialStatus.to_proto(
                  trial_module.TrialStatus.FAILED
              )
          )
          == trial_module.TrialStatus.FAILED
      )
      assert (
          trial_module.TrialStatus.from_proto(
              trial_module.TrialStatus.to_proto(
                  trial_module.TrialStatus.INVALID
              )
          )
          == trial_module.TrialStatus.INVALID
      )
      with pytest.raises(ValueError, match="Unknown status"):
          trial_module.TrialStatus.to_proto("OTHER")
      with pytest.raises(ValueError, match="Unknown status"):
          trial_module.TrialStatus.from_proto(16)
  
file_path: keras-tuner/keras_tuner/engine/trial_test.py
imports: import io
  import sys
  import pytest
  from keras_tuner.engine import hyperparameters
  from keras_tuner.engine import metrics_tracking
  from keras_tuner.engine import trial
label_desc: Use image node_id 2 for calling a global function with example usage: test_trial_status_proto() without return types