code: def test_trial_error_in_summary():
      error_message = "stack_trace\nerror_type\n"
      trial = trial_module.Trial(
          hyperparameters=hp_module.HyperParameters(),
          trial_id="3",
          status=trial_module.TrialStatus.FAILED,
          message=error_message,
      )
  
      stdout = io.StringIO()
      sys.stdout = stdout
      trial.summary()
      sys.stdout = sys.__stdout__
      assert error_message in stdout.getvalue()
  
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 3 for calling a global function with example usage: test_trial_error_in_summary() without return types