code: def test_err(capfd):
      msg = "Something that should not show up in log"
      stream = StringIO()
      with redirect_stderr(stream):
          m.raw_err(msg)
      stdout, stderr = capfd.readouterr()
      assert stdout == ""
      assert stderr == msg
      assert stream.getvalue() == ""
  
      stream = StringIO()
      with redirect_stderr(stream):
          m.captured_err(msg)
      stdout, stderr = capfd.readouterr()
      assert stdout == ""
      assert stderr == ""
      assert stream.getvalue() == msg
  
imports: from contextlib import redirect_stderr, redirect_stdout
  from io import StringIO
  from pybind11_tests import iostream
label_desc: Use image node_id 16 for calling a global function with example usage: test_err(capfd) without return types