code: def test_stream_output_handler(
      handler,
      translation_input,
      translation_output,
      translation_walltime,
      expected_string,
  ):
      handler.handle(
          translation_input, translation_output, translation_walltime
      )
      assert handler.stream.getvalue() == expected_string
  
imports: import io
  import pytest
  import sockeye.output_handler
  from sockeye.inference import TranslatorInput, TranslatorOutput
label_desc: Use image node_id 1 for calling a global function with example usage: test_stream_output_handler(handler, translation_input, translation_output, translation_walltime, expected_string) without return types