code: def test_capture_stdout():
      buf = io.StringIO()
      ret_string, code = ufs.capture_stdout(
          ["echo", "hello!"], file=buf
      )
      assert code == 0
  
      # Verify that the stdout is reported to the supplied file, and that it's
      # captured by the function and returned correctly.
      assert ret_string == "hello!\n"
      assert buf.getvalue() == ret_string
  
file_path: caliban/tests/caliban/util/test_fs.py
imports: import io
  import json
  import os
  import caliban.util.fs
label_desc: Use image node_id 4 for calling a global function with example usage: test_capture_stdout() without return types